-
May 29th, 2022, 06:56 AM
#1
Thread Starter
Junior Member
DAO - reading .mdb date field affected by Windows local date format
<Solved> But since I have been programming VB6 DAO for many years and only just found this, I thought I'd leave a note here.
I write dates to an .MDB file as DD MMM YYYY (eg 23 Jun 2018) in a "date type" field (column).
For many years I opened the Table and used DAO to read the field and it gave me (eg.) 23 Jun 2018.
Now I have found that if Windows local date format is set (for example) to YYYY-MM-DD, then DAO will return 2018-06-23.
Anyway, that solved my problem why my program worked on most PCs, but not on one or two.
-
Jun 2nd, 2022, 12:42 PM
#2
Re: DAO - reading .mdb date field affected by Windows local date format
Right, because dates don't really have a format to them ... It's just the visual representation of the value (which is a decimal number behind the scenes). That's why one should always use the appropriate data type (date/datetime) and not worry about the format itself, except when displaying it.
-tg
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|