1

Closed

ControlType Date ToString print wrong date

description

Printing a item["my date field"].ToString() does not return the current picked date, instead Date - 1 day.

Should return the date picked with the date picker component.
Closed Feb 19 at 6:11 AM by kooboo

comments

kooboo wrote Jul 17, 2012 at 2:41 AM

The data was saved as UTCDate in the database, so you have to convert it to a local date, for example: @(((DateTime)item["Date"]).ToLocalTime().ToString())

plexfred wrote Jul 17, 2012 at 4:23 PM

aah thanks..