Form response backend date format

Posted by Community Admin on 04-Aug-2018 22:51

Form response backend date format

All Replies

Posted by Community Admin on 03-Jul-2014 00:00

Hello,

I've created a Date Picker form widget based on this sitefinity tutorial. The user can only pick a day, not the time. It is working ok but I've noticed that there is an issue of how the date is displayed in the form response. The date time is 7 hours behind the selected day. See the attached image. 

The selected date time is always  MM DD YYYY 12:00 am, so when you see the date in the back end it is 17:00 the previous day. The Date is properly formatted in the code, and I'm assuming the date is entered into the way it is formatted in the code.

 How do We fix this? 

Thanks.

Posted by Community Admin on 03-Jul-2014 00:00

Have you tried .ToSitefinityUITime() on the dates themselves? (Its an extension in the "Telerik.Sitefinity" namespace)

Posted by Community Admin on 08-Jul-2014 00:00
Hi,

Sitefinity saves date-time formats in UTC and stores them this way in the database. As Steve suggests you need to use a ToLocalTime() or ToSitefinityUiTime() in order to convert it back to the proper for your respective time zone time.

Regards,
Pavel Benov
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 
This thread is closed