Develop a Custom Date/Time User Control(repost)
$20-25 USD
货到付款
Develop a Date/Time User Control that will Format the Users Input into a Valid DateTime format recognized by C# and SQL Server.
## Deliverables
Develop a Custom Date/Time User Control
Develop a Date/Time User Control that will Format the Users Input into a Valid DateTime format recognized by C# and SQL Server.
User control should be a text box control. The control should have a property that returns a correctly formatted date or date/time value.
Control should have properties so that the datetime format can be configured as needed such as short or long date, coder should include 5+ valid formats.
Control should have a property for returning a date vale, a time value and a date/time value combined
Code should decipher user's input and format the input value to a correctly formatted date/time value. Such users inputs should include but not be limited to:
User Input: 061111 - Return: 06/11/2011 or 06/11/11
User Input: 06112011 - Return: 06/11/2011 or 06/11/11
User Input: 61111 - Return: 06/11/2011 or 06/11/11
User Input: 6112011 - Return: 06/11/2011 or 06/11/11
User Input: 06/11/11 - Return: 06/11/2011 or 06/11/11
User Input: [url removed, login to view] - Return: 06/11/2011 or 06/11/11
User Input: 06-11-11 - Return: 06/11/2011 or 06/11/11
User Input: 06 11 2011 - Return: 06/11/2011 or 06/11/11
Assume current year if year part not specified
User Input: 0611 - Return: 06/11/2011 or 06/11/11
User Input: 611 - Return: 06/11/2011 or 06/11/11
User Input: 611 - Return: 06/11/2011 or 06/11/11
User Input: 06/11 - Return: 06/11/2011 or 06/11/11
User Input: 06.11 - Return: 06/11/2011 or 06/11/11
User Input: 06-11 - Return: 06/11/2011 or 06/11/11
User Input: 06 11 - Return: 06/11/2011 or 06/11/11
No 3rd party software to be used in this project
Coder should consider using the [url removed, login to view] Method
Control should recognize different date separators recognized by the Operating System's regional settings
Apply same logic for time part of date/time if a time is entered.
Control should have a property that can be set so it knows what to expect from user input (only a date, only a time value or a date/time value)
If user did not enter a valid input, user should be notified.
If full year not specified in year part then current century should be assumed. User must enter century if not current century for example 76 = 2076 vs. 1976 = 1976
Valid user input date formats should include all those accepted by QuickBooks 2011
Code in VB.NET and C#
Code in VS2010
项目ID: #3387346