1
Answer

DateTime field

Vinh Nguyen

Vinh Nguyen

19y
1.9k
1
Hello Everyone,
I has one of the source code line is: "DateTime startTimeSelecion = startDateTimePickerCarton.Value" but when I debug and saw only MM/DD/YYYY without HH:MM.  What do I need to do in order for me to be able to see MM/DD/YYYYY HH:MM.  The reason that I need to have Date & time values in order for me to select all the records from my table.  In my table has a date field as DateTime. Can someone help me.  Thanks 
Answers (1)
0
Binu Subi

Binu Subi

NA 68 0 19y
What is your datetime picker control? Maybe there is a "format" property where you can specify the datetime format.
Also, if you want to query data from db based on just the date ( and concerned about having date and time in the db field ), just use convert() function in the sql stored proc to convert to mm/dd/yyyy format and use the shortdate from your front end code..

Hope this helps!

Cheers!