Skip to main content
Solved

Adding a time set to a formulated date field

  • May 23, 2022
  • 2 replies
  • 46 views

Forum|alt.badge.img+1

Hi team!

I’ve been using this wonderful formula to set a due date for something, but the issue I have is that it defaults to 12:00AM. How would I append this formula to set it to, say, 4AM?

Thanks!

Best answer by TheTimeSavingCo

Hi automadien, you’d just need to do another DATEADD() to it, where you add 4 hours to the result. This should work for what you’re looking for:

DATEADD(
  DATEADD(
    DATEADD(
      TODAY(), 
      -1, 
      'month'
    ), 
    -(DAY(TODAY()) - 1), 
    'days'
  ),
  '4',
  'hours'
)```

2 replies

TheTimeSavingCo
Forum|alt.badge.img+31
  • Brainy
  • 6463 replies
  • Answer
  • May 23, 2022

Hi automadien, you’d just need to do another DATEADD() to it, where you add 4 hours to the result. This should work for what you’re looking for:

DATEADD(
  DATEADD(
    DATEADD(
      TODAY(), 
      -1, 
      'month'
    ), 
    -(DAY(TODAY()) - 1), 
    'days'
  ),
  '4',
  'hours'
)```

Forum|alt.badge.img+1
  • Author
  • Inspiring
  • 17 replies
  • May 23, 2022

Hi automadien, you’d just need to do another DATEADD() to it, where you add 4 hours to the result. This should work for what you’re looking for:

DATEADD(
  DATEADD(
    DATEADD(
      TODAY(), 
      -1, 
      'month'
    ), 
    -(DAY(TODAY()) - 1), 
    'days'
  ),
  '4',
  'hours'
)```

Spectacular. Thanks Adam, have a great day!