Customized DateTime Picker Control
-
Dear Friends, I need to add a customized DateTime picker control onto my webpage. As in my database table; the data is being stored in the following format:- "yyyy-mm-dd hh:mm:ss.mmm" so the user needs to select the date and time in the following format only in order to get the correct data from the database. But I am not able to make such control. Could anyone help me out, how should i proceed with making this control?
-
Dear Friends, I need to add a customized DateTime picker control onto my webpage. As in my database table; the data is being stored in the following format:- "yyyy-mm-dd hh:mm:ss.mmm" so the user needs to select the date and time in the following format only in order to get the correct data from the database. But I am not able to make such control. Could anyone help me out, how should i proceed with making this control?
As far as I understand your question, You don't need to make such a custom control to display value in format you want. there's inbuilt property in DateTime Picker control of Custom format you can set custom format as you want accordingly. See this MSDN[^] Article for more detail.
Regards, Hiren. Microsoft Dynamics CRM "A SQL query goes into a bar, walks up to two tables and asks, "Can I join you?", "yes naturally""
-
Dear Friends, I need to add a customized DateTime picker control onto my webpage. As in my database table; the data is being stored in the following format:- "yyyy-mm-dd hh:mm:ss.mmm" so the user needs to select the date and time in the following format only in order to get the correct data from the database. But I am not able to make such control. Could anyone help me out, how should i proceed with making this control?
You should never store a date, a time or a datetime as a string if there are alternatives. Most databases do have some kind of date or datetime field type, so use it. A database cares about storing data, not formatting it; your app must deal with formatting data when presented to the user. This[^] little article may tell you more about datetime type. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, and update CP Vanity to V2.0 if you haven't already.