Returning a date based on date/time criteria

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LarryM
    New Member
    • Jun 2012
    • 5

    Returning a date based on date/time criteria

    The start of the business day is 0700. However actual times are recorded. I would like to have a field that can round to a date based on actual date/time that is entered.

    I.E. If the date/time falls between 6/1 0701 and 6/2 0700 the field would return 6/2. So if the actual date/time is 6/1 03:15 the date would be 6/1, if the actual date/time was 6/1 14:25 it would return 6/2.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Use the IIf() function to check the time and if it's after 0700 and before 1200, add a day.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32645

      #3
      Take the DateValue() of the original value plus #16:59:59# (which is equivalent to a day minus #7:00:00# but with a second the other way to ensure 0700 itself is not rolled over).

      Comment

      Working...