I have a table from an outside database. The date/time is stored as a text field in the format of 2014-06-18 08:00:00.0000000.
I have a start time and an end time field, both in that format. I need to calculate the time between, but it won't do it because it is a text field.
I am trying to build an Access Query to do calculations. If I try to use CDate in my query to convert the field, I get a compile error. Here is the code that I'm using in my query:
Start: CDate ( Mid( [tmpMelony]![staffing_start_dt] , 6, 2) & "/"& Mid( [tmpMelony]![staffing_start_dt] , 9, 2) &"/"& Left( [tmpMelony]![staffing_start_dt] , 4) )
I get a Compile Error.
Please help!
I have a start time and an end time field, both in that format. I need to calculate the time between, but it won't do it because it is a text field.
I am trying to build an Access Query to do calculations. If I try to use CDate in my query to convert the field, I get a compile error. Here is the code that I'm using in my query:
Start: CDate ( Mid( [tmpMelony]![staffing_start_dt] , 6, 2) & "/"& Mid( [tmpMelony]![staffing_start_dt] , 9, 2) &"/"& Left( [tmpMelony]![staffing_start_dt] , 4) )
I get a Compile Error.
Please help!