Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TIME type format conversion

Status
Not open for further replies.

EBee

MIS
Aug 10, 2001
229
US
I have a 00:01:43 as time and i am trying to store this in access. When I import this to an a DATE/TIME type field, it adds the AM, PM after it and formats the time. I just want this to be formated the way it is without the AM/ PM and still recognise it as a TIME field. I do a calculation later on that's why i need to keep it as time.

00:01:50 +
00:01:50 +
-----------
00:03:00

thans in advance
erwin

 
Your calculation appears to add two numbers together not time. Whilst you could store in a time based format and still add, the additions will be easier if you store the value as a number and perhaps add a validation rule to ensure the time is in keeping with your format.
 
Try the timevalue() function, you may have to convert your time to a string value.

Or you can strip the AM, PM by using the left() function and striping off only the time.

Ck help

Just a guess, hope it helps.
Trudye
 
The problem storing the time in Access97 are the following

1. the DATE/TIME field adds the AM/PM
2. The DATE/TIME field converts 00:01:30 to 12:01:30 AM

If i strip the AM/PM at the end, the time is still 12:01:30 when it is actually 00:01:30 ( a min and 30 sec) not 12:01:30 AM in the morning.

i need to keep it a time value so i can calcualte it like number type. then display it as 00:01:30 on the report and form.

In the original data from the oracle database is in seconds then i converted it in access to

Format([DUR_ON]/86400,"hh.nnss"), this allows me to add/avg/total/. .etc.

Now, i want to put it back to view format of 00:01:30, but it is not converting properly for some reason

thanks for all and any help to convert it

erwin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top