Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003

    Unanswered: Add # around dates

    I have two times called StartTime and EndTime in my query in the format of 2:00:00AM.
    I need to pass them to a module called Time Calculation that requires the format
    I don't know how to get the # and - to pass it to a function from my query. Can anyone help?

  2. #2
    Join Date
    Jul 2003
    Amsterdam, Nederland

    how about this

    at the end of your first function do the folowing :

    dim x as string
    x = '(#' & StartTime & '# - #' & EndTime & '#)'

    ' then call

    ElapsedTime (x)

  3. #3
    Join Date
    Aug 2003
    Delft, The Netherlands (EU)

    Re: Add # around dates

    You should consider to use the DateDiff() function! It requires datetime values as you already have, and it allows you to specify your result in seconds, minutes or whatever.

    To tranform a datetime variable into a string, you should use the format() function!
    Make everything as simple as possible, but not simpler! - A. Einstein
    DB Problems? DB Explorer, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool

Posting Permissions

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