How to calculate date without hours and minutes ?

  • 30 December 2015
  • 1 reply
  • 0 views

Badge +6

Hello,

 

- Context :

I made a site workflow with a condition like this:

If my variable "varTodayDate" = "varExpirationRequestDate", do something, if not, stop the workflow.*

 

- Problem :

I use "Calculate Date" to define the differents variables ("varTodayDate" / "varExpirationRequestDate") that I need in my condition.

The problem of this method is the format date after "Calculate Date", I have a sort like this : "12/30/2015 12:02 AM"

I'm just interest by "12/30/2015" and I want to know if it's possible to remove hours ?

 

- Goal :

Compare variables "varTodayDate" / "varExpirationRequestDate", if it's the same, do something, if not stop the workflow.

 

PS : I thought used "DateDiffDays" function but I can't include this function properly in my process.

 

Do you have any solution =) ?

 

Thanks

Theo


1 reply

Badge +6

Hi again,

 

Yes, I've find a solution based on your answer.

At the beginning, I don't really understand the comportement of Datetime type by Nintex/Sharepoint.

But I've tried different solution and I find an easiest way to realise my goal.

 

- Build string on my "varTodayDate" : I just use a function formatDate({WFVariable:varTodayDate}, "DD/MM/yyyy")

- Build string on my "varExpirationRequestDate" : function formatDate({WFVariable:varExpirationRequestDate}, "DD/MM/yyyy")

- Set my condition basically : if "varTodayDate" = "varExpirationRequestDate" => Continue the WF

 

And it work well. Thanks for you advise.

 

BR

Theo

Reply