We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Setting time in DateTimePicker

Thread ID:

Created:

Updated:

Platform:

Replies:

41060 Feb 21,2006 06:48 PM UTC Feb 22,2006 03:47 PM UTC WinForms 4
loading
Tags: Tools
John Valescu
Asked On February 21, 2006 06:48 PM UTC

Is there a way to force the time to midnight, 00:00:00 when saving to a SQL server database regardless of the current time? Thanks!

Anupama Roy [Syncfusion]
Replied On February 22, 2006 05:06 AM UTC

Hi, You can consider writing something like this inorder to force the time to "00:00:00" .Here the variable "t" checks for the time and finally returns the value you want. TimeSpan t=this.dateTimePickerAdv1.Value.TimeOfDay; if(t>TimeSpan.Parse ("00:00:00") || t

Anupama Roy [Syncfusion]
Replied On February 22, 2006 05:10 AM UTC

Hi , The code snippet seems to be chewed up.Please take a look at this. TimeSpan t=this.dateTimePickerAdv1.Value.TimeOfDay; if(t>TimeSpan.Parse ("00:00:00") || t

Anupama Roy [Syncfusion]
Replied On February 22, 2006 05:17 AM UTC

Hi, Take a look at the sample for the above mentioned code snippet. Sample Regards, Anu.

John Valescu
Replied On February 22, 2006 03:47 PM UTC

Anu, Thanks for the quick response. I actually want to change the time to 00:00:00 before commiting it to the SQL database. I''ve tried changing some of the members of the class, but most of them are read-only. >Hi, > >Take a look at the sample for the above mentioned code snippet. >Sample > > >Regards, > >Anu. > >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;