Customizing Date/Time (1 Viewer)

justphilip2003

Registered User.
Local time
Today, 08:15
Joined
Mar 3, 2013
Messages
30
On a field in my Table, I would like to have a format (dd mmm yyyy) or (dd-mmm-yyyy) or (yyyy-mm-dd) because my data spans several centuries and I wish to sort on this field. "Medium Date" comes close but messes up the century changes. Is there a way of establishing this format in my table and have it replicate in all forms? TIA JP
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 08:15
Joined
Feb 28, 2001
Messages
27,131
Be aware that if you are literally talking about dates prior to 1900 (you said "several centuries", after all...), you have to use all dates as text in some conventional format that NEVER EVER goes through a date/time variable. The date formatting routines will not like such "pre-historic" dates.

The problem stems from the fact that Access, Excel, and Windows (for that matter, Unix and OpenVMS and SOLARIS, too) all use a date/time variable as a number representing some unit of time more recent than some reference date. I.e. times are "reference-date + elapsed-time" and the variables store the elapsed time but the date formatting routines add the (constant) reference date and start figuring the date from there.

You can do things to the elapsed-time variable but not to the reference date, unless you want to look up the topic of converting dates from some reference date to a modern calendar date. For instance, Google "Gregorian calendar" and you will get some references about converting dates and times in some format or another. Where you trip over things is that dates BEFORE the reference date cannot be so easily stored using the system standard reference routines.

Also, you don't say how many centuries, but remember that Rome switched from Julian to Gregorian calendars in 1582 but other countries didn't immediately follow suit. There is an approximately 11 day drift between Julian and Gregorian calendars, which is why New Year's Day no longer matches the date of the Winter Solstice.
 

Users who are viewing this thread

Top Bottom