Time Operations

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rwalle
    New Member
    • Jan 2010
    • 47

    Time Operations

    Hi
    I have a DB where I calculate the work shift based on the time of day , I have the time of the day form a Timestamp field , it has "dd/mm/yyyy hh:mm:ss a.m./p.m." format, I used the Datepart function to obtain the Hour and set the shift based on it but now I need to define the shift based on half hours and I dont know what function I need to use to obtain the time of the day on a "hh:mm" format and then use it on IIF function to obtain that shift number

    any help will be appreciated

    Raymundo Walle
  • Delerna
    Recognized Expert Top Contributor
    • Jan 2008
    • 1134

    #2
    I don't know of 'A' function to do that but simple string manipulation will get it for you.

    [code=sql]
    t: CStr(DatePart(" h",Now())) & ":" & CStr(DatePart(" n",Now()))
    [/code]

    Comment

    • rwalle
      New Member
      • Jan 2010
      • 47

      #3
      Delerna:

      Tks for your response its running now

      R Walle

      Comment

      Working...