Convert Date Time format (1 Viewer)

kostaskir

Registered User.
Local time
Today, 10:20
Joined
Jan 21, 2009
Messages
65
Hello guys,

I import an XML file in my database and I produce a report. One of the fields that I use has Date Time Format (27/04/2010 11:09).



My boss asked me to change this string: 27/04/2010 11:09 to 201004271109. Without special characters and the date time from dd/mm/yyyy hh:mm to yyyymmddhhmm .


Thanx in advance :)



Any thoughts?
 

John.Woody

Registered User.
Local time
Today, 08:20
Joined
Sep 10, 2001
Messages
354
Look at the datepart function, you could use this to select each part and re-arrange.
 

namliam

The Mailman - AWF VIP
Local time
Today, 09:20
Joined
Aug 11, 2003
Messages
11,695
Try using the FORMAT function
 

MStef

Registered User.
Local time
Today, 08:20
Joined
Oct 28, 2004
Messages
2,251
I suggest, leave it in the table in format dd/mm/yyyy hh:mm (as it is),
but, in the form (for your boss) show it in the format yyyymmddhhmm.
Look at "DemoDatetimeA2002.mdb" (attachment, zip).
Look at Table1, Form1.
Open form1 and see.
 

Attachments

  • DemoDateTimeA2002.zip
    11.9 KB · Views: 89

Users who are viewing this thread

Top Bottom