If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Date and Time Conversions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-07-12, 18:59
lcking0623 lcking0623 is offline
Registered User
 
Join Date: Aug 2012
Posts: 5
Date and Time Conversions

Ok, I have a database where we want to tracking how long it takes us to do two different tasks but using the hh:nn:ss but not the actual time. For example, it took me 1 hour, two minutes and three seconds, needs to be notated in the field as 01:02:03 then I have a field that would take that field and the other field with the same format to give me a total.

For example, the second field is 01:00:43 (1 hour and 43 seconds) so I would get 02:02:46 = 2 hours, 2 minutes and 46 seconds. I thought I could use DateDiff Function but it won't work. Does anyone have any suggestions?

The second question that I have is since this database is in a work flow, each step has a Date Completed and Date Received so one process is completed the date received in the next process needs to be autofilled with the date completed information. does anyone have a suggestion?? Thank you. I am really trying to do everything that my new job is asking for. If it cannot be done, let me know so I can suggest another option.
Reply With Quote
  #2 (permalink)  
Old 08-08-12, 02:42
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 4,148
Quote:
Originally Posted by lcking0623 View Post
For example, the second field is 01:00:43 (1 hour and 43 seconds) so I would get 02:02:46 = 2 hours, 2 minutes and 46 seconds. I thought I could use DateDiff Function but it won't work. Does anyone have any suggestions?
Why? What's the expression (SQL or VBA) you used and what was returned (unexpected value or error)?
__________________
Have a nice day!
Reply With Quote
  #3 (permalink)  
Old 08-08-12, 07:50
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 10,496
store the value as a date time value the date part will default to 01 Jan 1900, but that shoudln't matter.
after its stored as a datetime value then you can use the datetime functions such as datediff

but then again
Quote:
since this database is in a work flow, each step has a Date Completed and Date Received
there is no reason why you cannot store the datetime a process started and a datetime when the process finished

the process doesn't need to be autofilled as defacto when the proceeding process completes then its available for the next process which depending on the production may happen immediately afterwards or may happen at a time int he future.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #4 (permalink)  
Old 08-08-12, 09:50
lcking0623 lcking0623 is offline
Registered User
 
Join Date: Aug 2012
Posts: 5
For the first part of my question, I put in my it in DateDiff("hh:nn:ss",[Field1]+[Field2]+3 minutes).
Reply With Quote
  #5 (permalink)  
Old 08-08-12, 15:46
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 4,148
You confuse the syntax of the DateDiff function with the syntax of the Format function and you mix both in the expression.

See: DateDiff Function - Access - Office.com
And: Format Function
__________________
Have a nice day!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On