Converting text to date

ya5irha55an

Registered User.
Local time
Today, 04:28
Joined
Sep 20, 2005
Messages
20
Hi, I have the following problem which I hope someone can help me with:

I am importing a CSV file, one of the field in which contains times in the following format: 1200 (ie this is 12:00, th text file does not contain the : separator)

I want these to be recognised as time values by access, which at the moment only treats them as text. Is there any way i can run a query on this table to convert the numbers into times? I can do it in excel using concatenate to add in the :, but access does not have this function.

Thanks in advance!
 
timeserial(left([YourValue],2),right([yourvalue],2),0)
 
Thats brilliant, thats a lot!

One further question, having done this i have noticed that the time values in my original table are not all in 4 digit format, eg 07:00 is 700 but 12:00 is 1200. Is there any way for me to do a count of characters, so i can adjust the left/right functions to accomodate?
 

Users who are viewing this thread

Back
Top Bottom