Skip to main content
Nintex Community Menu Bar
Solved

What is the best way to compare workflow current date and a datetime column in a list?

  • December 13, 2022
  • 2 replies
  • 850 views
  • Translate

Forum|alt.badge.img+4

I love to compare two DateTime dates in my workflow

Best answer by Garrett

Hi @Messam 

 

You can use either the Run-If or the Conditional Branch action to compare Datetimes.

You can compare with the Greater Than (>) or the Lesser Than (<) operator.

 

Comparing for Equality (==) requires a little more effort. Equality comparison will always fail. While the date are the same, the time are different. Convert the Datetimes value into a Short Date or Long Date String. Use a Build String action on a DateTime variable.
Once converted into String type, you should be able to compare for Equality.

 

Hope that helps

View original
Did this topic help you find an answer to your question?

2 replies

Garrett
Forum|alt.badge.img+16
  • Scout
  • 904 replies
  • Answer
  • December 13, 2022

Hi @Messam 

 

You can use either the Run-If or the Conditional Branch action to compare Datetimes.

You can compare with the Greater Than (>) or the Lesser Than (<) operator.

 

Comparing for Equality (==) requires a little more effort. Equality comparison will always fail. While the date are the same, the time are different. Convert the Datetimes value into a Short Date or Long Date String. Use a Build String action on a DateTime variable.
Once converted into String type, you should be able to compare for Equality.

 

Hope that helps

Translate

Forum|alt.badge.img+4
  • Author
  • Rookie
  • 10 replies
  • December 24, 2022

Thanks very much. The time difference was really a big issue for me for me.

 

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings