Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Format

Status
Not open for further replies.

TSI01

Technical User
Apr 1, 2005
9
CA
Hi there,

Can anyone help me. I have a field that contains dates in the format "dd-mm-yyyy" which is okay for double digit months. What I need to do is tell the system to enter a "0" before a single month digit to amend the date from "12-2-2005" to "12-02-2005". I can do it, but only by creating 4 different queries, can anyone help me symplify it?
The only other problem is that the field type is text.
 
hmm, I thought the "dd-mm-yyyy" format already did that...

are you using the given short date format or specifically calling the "dd-mm-yyyy" date format?



--------------------
Procrastinate Now!
 
While you are in the design view of the query right click onthe field and choose properties set the format there.

________________________________________
Zameer Abdulla
Visit Me
Hold your child's hand every chance you get.
A time will come when he or she won't let you.
 
Tried that, no format option was given in the drop down.
 
you'll have to do it in the sql then...


format(field, "dd-mm-yyyy")

--------------------
Procrastinate Now!
 
The only other problem is that the field type is text
myDate: Format(CDate([text field]), 'dd-mm-yyyy')

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top