Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2012
    Posts
    5

    Unanswered: 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.

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    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!

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    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
    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 on the Tiger 800 or the Norton

  4. #4
    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).

  5. #5
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •