Skip to main content
Nintex Community Menu Bar

First of Month date calc for Nintex Workflows

  • April 28, 2020
  • 4 replies
  • 17 views

minnelli10
Forum|alt.badge.img+1

Hello, I am using Nintex workflows integrated in SharePoint 2013.  I have a variable which defaults to today's date.  I want to then use this variable to figure out the first of the month and assign it to the variable.  Is there a way to do this without trying to call a SQL function or procedure?   Thank you!

4 replies

Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • May 1, 2020
Hi,

Do you want to figure out the 1st of the month for the month that the workflow runs.
IE. Workflow runs on the 15th of March and you want to store the 1st of March.
Or
The 1st of the month for the following month?
IE. Workflow runs on the 15th of March and you want to store the 1st of April.

minnelli10
Forum|alt.badge.img+1
  • Author
  • May 4, 2020

Hello, I would be interested in figuring out the first of the month based off of a variable or when the workflow runs.  So if it runs on March 15th, I would want to store March 1st in a variable.   Thank you! 


Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • May 4, 2020

Hi,

 

Easiest way would be to chop the first two numbers from the current date and add a 1 using a regular expression action.

7716iCAD2E072DA947B41.png

 


minnelli10
Forum|alt.badge.img+1
  • Author
  • May 5, 2020

Thanks!  When I did a test, I saw this updated the month to 1 and not the date.  

 

For example, I used the same common current date field (5/5/20) and it updated it to 1/5/20.  I also noticed this updates a string type.  How can I put 5/1/20 into a datetime variable, if possible?

 

Thank you!