Ron
Tue Oct 19 07:58:05 CDT 2004
Chris,
Or just use myDateTime.Date to get the Date part of the value for
storing in the database.
Ron Allen
"Sijin Joseph" <sijinNOSPAMdotnet@hotmail.com> wrote in message
news:uWo0CyctEHA.2864@TK2MSFTNGP09.phx.gbl...
> If you are going to use a DateTime datatype to hold the value then
> ofcourse a time element will be involved, is the database field a string
> or a datetime?
>
> You can get just the date part of a DateTime by using
> DateTime.ToShortDateString() or DateTime.ToLongDateString()
>
> Let me know how you are storing the value in the DB and how are you
> showing it in the UI, i'll be able to help you better.
>
> Sijin Joseph
>
http://www.indiangeek.net
>
http://weblogs.asp.net/sjoseph
>
> Chris Ashley wrote:
>> How do I stop my DateTimePickers storing a time value? I just need to
>> insert the date part into my database but the DateTimePicker.Value
>> property seems to be in the format ##/##/## ##:##:##