Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How i can save the date and time to database using date piker..

any Demo...!!!plz
Posted
Comments
Naz_Firdouse 1-Apr-13 5:02am    
Get the selected date and time from datepicker...
Refer the links below
http://stackoverflow.com/questions/93472/datetimepicker-pick-both-date-and-time
http://www.dreamincode.net/forums/topic/39512-date-time-picker-how-can-i-choose-both-a-date-and-a-time/
and then store the value in DB using stored procedures....

1 solution

C#
string selectedDate;
selectedDate = dateTimePicker1.Value;


Now store selectedDate into database.

Check below link for example:
datetimepicker-how-to-save-date-into-the-db[^]
http://forums.asp.net/t/1391245.aspx/1[^]
How to INSERT date into sql db date column using dateTimePicker?[^]
 
Share this answer
 
Comments
Richard MacCutchan 1-Apr-13 12:00pm    
A very bad suggestion, you should never store dates as strings.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900