Skip to main content
Answer

GI condition to display results timestamped within the past 6 hours

  • May 1, 2023
  • 3 replies
  • 72 views

Forum|alt.badge.img

I’m trying to use the SOShipment.ConfirmedDateTime field as a condition in a GI to show all shipments that were confirmed within the past 6 hours. i.e. Between Now()-6hrs AND Now()

Anyone know if this is possible?

Best answer by aaghaei

Use the below filter

Data Field: SOShipment.ConfirmedDateTime

Condition: Is Greater Than or Equal To

Value 1: =DateAdd(Now(), 'h', -6)

or if you want UTC time then

Value 1: Value 1: =DateAdd(NowUTC(), 'h', -6)

3 replies

aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • Answer
  • May 1, 2023

Use the below filter

Data Field: SOShipment.ConfirmedDateTime

Condition: Is Greater Than or Equal To

Value 1: =DateAdd(Now(), 'h', -6)

or if you want UTC time then

Value 1: Value 1: =DateAdd(NowUTC(), 'h', -6)


Forum|alt.badge.img
  • Author
  • Semi-Pro II
  • May 1, 2023

Thanks, @aaghaei! I was circling around that answer, and it turned out to be simpler than I was trying to make it.


aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • May 2, 2023

Glad it worked. cheers