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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format of Date from Query 1

Status
Not open for further replies.

ptrifile

Technical User
Aug 10, 2004
457
US
I have a simple query where I am adding today's date in a field and then adding 12:59:59 to the end of the date. My question is, the query is resulting in the following:

8/3/2020 12:59:59

and would like it to be formatted as follows:

08/03/2020 12:59:59

The query I am using is

IDate: Date() & " " & "12:59:59"

Can someone help me get the desired results? I have tried numerous "format" options but must not be getting the context correct.

Thank you,

Paul
 
[TT]Debug.Print Format(Date(), "MM/DD/YYYY")[/TT]
in Excel VBA gave me
[tt]09/01/2020[/tt]


---- Andy

There is a great need for a sarcasm font.
 
Thanks Andy, I am using this in a MS Access query but this helped me get the desired results. Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top