Can a date be saved in the database without also saving a time?

When recording a date without a time, the time is actually recorded…it is recorded as 00:00 (midnight).

I am concerned that this might cause some problems in the future as users in a different (earlier) time zone might retrieve the record showing a different date based on their local times.

Example:
Eastern Standard Time (US) user shows 1/1/2017 0:00
Central Standard Time US) user shows 12/31/2016 23:00

Is there a way to record just the date, without a time?

Alternatively, if not, would it make sense to have the default time recorded to 12:00 (noon) Eastern Standard Time as a way to avoid this problem, in most cases?

try using formatted as: and choose date format only. Maybe this help?

Yes, that works for the display, but it appears to save a time (00:00) in the database regardless of the display formatting.

I think you can’t get rid of the time as Date is a set type. You could save the date as a string instead, extrating it from the Date. I however tend to like to keep the Date and set hours, minutes and seconds to 0.

This topic was automatically closed after 70 days. New replies are no longer allowed.