Converting a Text field to a number in a table

Payal Patel

Registered User.
Local time
Today, 12:24
Joined
Nov 3, 2009
Messages
34
Hi,
I have imported data from a csv file. One of the fields coming in is in a time / text format. Once I bring the data into the table, is there a query i can run to convert the text field to a number?

thanks,
P
 
Hi -

Consider the TimeValue() function. Here are examples from the debug (immediate) window:

Code:
x = "12:56:37 PM" 
y = timevalue(x)
? y 
12:56:37 PM 

To show that Access is storing this as a date/time and not a string
? cdbl(y)
 0.53931712962963

HTH - Bob
 
thanks this helped
 

Users who are viewing this thread

Back
Top Bottom