Skip to main content
Nintex Community Menu Bar

How do I convert a string to a date

  • December 11, 2016
  • 5 replies
  • 40 views

Forum|alt.badge.img+9

I have a string variable that has the month,day, and year (eg.01/01/2016) and I am trying to Convert the string variable into a date using the Convert Value, but I keep getting the year 1900, eg. 01/04/1900..

Why is this occuring.....

Note my sequence is

1-Using Build String

   fn-FormatDate({DueDate},MM)/01/fn-FormatDate({DueDate},yyyy) which is stored in a variable called    strFirstDayOfTheMonth

2-Using ConvertValue

   Input is strFirstDayOfTheMonth

   Store Result in dtFirstDayOfTheMonth (date variable)

What am I doing wrong

   

5 replies

Forum|alt.badge.img+5
  • December 12, 2016

If you log the variable strFirstDayOfTheMonth to the Workflow History list before and after you convert the variable to date, whats the output in the history log?


Forum|alt.badge.img+9

I will check tomorrow and let you know..thx


Forum|alt.badge.img+9

Actually can you send me a screenshot of the below..the file will get rejected at my work site..Or if you can tell me some sandbox on the internet where I can review what you sent me that would be great..thx again


Forum|alt.badge.img+14
  • Scholar
  • December 12, 2016

how have you configured date format in convert value action?

it looks like single parts are misinterpreted.


Forum|alt.badge.img+9

It turns out I had a date variable further down that was not set thus the reason for 1900.  Thanks Shane for the advice on logging the date.  I wish I knew about that yesterday as it would have saved me hours !