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

Converting iDate to Text 1

Status
Not open for further replies.

dgillz

Instructor
Joined
Mar 2, 2001
Messages
10,059
Location
US
I need an expression to convert a date such as today as text, and concatenate it with a sring. For example, I want "COMM: " and today's date in a MMDDYY format:

"COMM: 080907"

I tried an expression of "COMM: "+text(month(now()),"00")

Which I could logically extend to get the day and year pieces of the date, but the text function is not recognized. What is the best way to do this?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
This always works for me. I'm using Datefield as the name of the field that you're updating.

"Comm: " & Format([Datefield],"mm") & Format([Datefield],"dd") & Format([Datefield],"yy")


Hope it helps!
 
Many thanks!

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Why not simply this ?
"Comm: " & Format([Datefield],"mmddyy")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top