srodgers45
asked on
Time Conversion
I need to convert a time that is a string value to a time value only - i want to subtract 2 times to get the difference- it will not allow it because of it being a string?
Trying to accomplish this:
Currently the 15:10:00 and other time is a string.
15:10:00 - 15:01:00 = 9:00
Trying to accomplish this:
Currently the 15:10:00 and other time is a string.
15:10:00 - 15:01:00 = 9:00
ASKER
Sorry i should have added that I have a date field that goes with the time - just separate
When I tried the formula above it comes up with all the times starting at 12:00. Do I need to add the date to the time? When it tried before to do this formula it did not show properly
DTSToDateTime({FDC_Trips.a tpsdate}+{ FDC_Trips. atpstime})
The time shown on the left in the screen shot is the proper time. The time on the right side is when I use the formula above to convert to datetime value. No sure why it would be different?
When I tried the formula above it comes up with all the times starting at 12:00. Do I need to add the date to the time? When it tried before to do this formula it did not show properly
DTSToDateTime({FDC_Trips.a
The time shown on the left in the screen shot is the proper time. The time on the right side is when I use the formula above to convert to datetime value. No sure why it would be different?
I should have said to display the answer in 24hour format so that 0 hours shows as 0 hours rather than 12
What does the date field have?
mlmcc
What does the date field have?
mlmcc
ASKER
The format for the date is 01-01-2011
Is the date field a date or string?
mlmcc
mlmcc
ASKER
Sorry, a string
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you need the date the function expects dates as 2011-01-01
mlmcc
mlmcc
ASKER
That worked. Thanks for the expert help.
mlmcc
Open in new window