convert a string to time formatting

S

scott

I'm having trouble converting #### string to a date/time formatted field.
I'm looking for a hh:nn result.

If I change the table format from text to date/time I get "#error" results.
other conversions yield 0000 in the field.
 
J

John Vinson

I'm having trouble converting #### string to a date/time formatted field.
I'm looking for a hh:nn result.

If I change the table format from text to date/time I get "#error" results.
other conversions yield 0000 in the field.

Try:

TimeValue(Val(Left([timestring], 2)), Val(Mid([timestring], 3, 2))

John W. Vinson[MVP]
 
Top