cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

How do I convert a string to a date

Jump to solution

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

   

Labels: (1)
Tags (1)
0 Kudos
Reply
5 Replies
Highlighted
Nintex Newbie

Re: How do I convert a string to a date

Jump to solution

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?

View solution in original post

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: How do I convert a string to a date

Jump to solution

I will check tomorrow and let you know..thx

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: How do I convert a string to a date

Jump to solution

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

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: How do I convert a string to a date

Jump to solution

how have you configured date format in convert value action?

it looks like single parts are misinterpreted.

Reply
Highlighted
Nintex Newbie

Re: How do I convert a string to a date

Jump to solution

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 !

0 Kudos
Reply