I need to extract the year from a user entered date field and display the year in a text field. Can someone help me with the correct script to do this?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
that's quite easy to realize with FormCalc.
In you date fields exit event add the following code:
textField1 = Num2Date( Date2Num($.formattedValue, "MM/DD/YYYY"), "YYYY")
Note: This sample assumes that your date field formats the date with "MM/DD/YYYY". You may have to change the pattern to make it work at your end.
Views
Replies
Total Likes
Hi,
that's quite easy to realize with FormCalc.
In you date fields exit event add the following code:
textField1 = Num2Date( Date2Num($.formattedValue, "MM/DD/YYYY"), "YYYY")
Note: This sample assumes that your date field formats the date with "MM/DD/YYYY". You may have to change the pattern to make it work at your end.
Views
Replies
Total Likes
Thank you - works great!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies