View Single Post
  #2 (permalink)  
Old May 26th, 2006, 16:28
Jacque Jacque is offline
New Member
Join Date: May 2006
Location: Norway
Age: 38
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Lightbulb Re: DateTime Function

If I have understood your questions right, I think you could just simply use the following DateTime-functions:

Year, Month, Day, Hour, Minute and Second.

With these functions you can extract the relevant part of your DateTime data and easily reconstructed it in the way you want. For example:

Date = Day(DateTime) & Month(DateTime) & Year(DateTime)
Time = Hour(DateTime) & Minute(DateTime) & Second(DateTime)

You may also want to check if the values resulting from the functions Day, Month, Hour, Minute and Second are less than 10 so that to prefix a Zero. In this way you ensure that dates and times are presented in the correct format (dd/mm/yyy and hh:mm:ss). For example 01/01/2006 and not 1/1/2006.

I hope this helps you.

Sincerely
Jacque
Reply With Quote