If your date is actually stored in that format (like 01-Mar-2026), then it's probably in a text field, not a true Date/Time field. That's where things get tricky, because once it's text, you lose proper date behavior like sorting.
If you're starting with a real date value and just want to display it that way, you can use the Format function like this:
NewDateString = Format(D, "dd-mmm-yyyy")
Just keep in mind that Format returns text, not a date. So if you need to sort by month or do any real date calculations, you want to keep the original field as a true Date/Time and only format it for display.
And EVERYONE knows that yyyy-mm-dd is THE BEST format. :)
John Williams
@Reply 5 months ago
Tom If the underlying data type is date/time the sort will be in order. If you want to group by month, you can separate out by using year and month functions : year([datefield]), month([datefield]).
Tom Watch the video that Kevin assigned you to. It's a Windows system setting. Once you set it in Windows, all of your applications will use that as the short date format.
I started using it because I've got students all around the world, and I was doing databases that were making specific use of the USA date format, which I've always used since I was a kid (month-day-year). Writing code specific to that format now, I've got people in Europe and around the world with a different day-month-year format, which honestly makes more sense.
Eventually I decided to standardize on ISO dates (year-month-day) because it's the most logical date format. It works best with computers because you don't have to do any extra work to sort it, and it's just better. I've been writing it on my checks and on receipts and everything for the past 10 years now, so people look at it and go, "Huh?" I'm at the doctor's office and I fill out the little form and put an ISO date there for my date of birth. I can always see the quizzical look on the receptionist's face when they first look at it, but it's well worth it.
My goal is to switch everybody to ISO dates and get rid of daylight saving time. Those are my two goals. If I can't make the world a Star Trek-like utopia, I can at least do those two things.
Tom JuricOP
@Reply 5 months ago
I just watched the video and learned a lot. Using it now and my code works perfectly. Thank you all for your help!
I totally agree on DST
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access TechHelp.