I've searched this forum and google to see if I could get something to work with negative results. I created a form on Livecycle 8.2 and I'm trying to set a due date 30 days from todays date. When the form is opened I have the current date and time, read only, displayed so I would also like the due date to automatically show. I know nothing about Java and what I've used so far I've been able to copy and paste to my form. Any help would be greatly appreciated.
Solved! Go to Solution.
Views
Replies
Total Likes
It has been over-complicated. All you need is:
$ = Num2Date(date() + 30, "MM/DD/YYYY")
Views
Replies
Total Likes
You use the Date2Num and Num2Date functions to do this. You turn the first date into a number using Date2Num then add 30 to it and turn it back into a date using Num2Date.
Views
Replies
Total Likes
Hmmm. I've seen these in my searching but have no idea what to do with them. Thanks.
Views
Replies
Total Likes
Drag date field and select layout ready event and language - formcalc and keep below script that would help you.
$.rawValue= num2date(date2num(num2date(date(), DateFmt(3)))+30)
Vjay
Views
Replies
Total Likes
Thanks. It worked but what would I do to display the date as MM/DD/YYYY and make it read only?
Views
Replies
Total Likes
I have the read only part worked out and have been playing with the format but can't get it to display how I want it.
Views
Replies
Total Likes
$.rawValue= num2date(date2num(num2date(date(), "MM/DD/YYYY"))+30)
Check this it might work.
Vjay
Views
Replies
Total Likes
I actually tried this earlier this morning and it returns the date "Jan 30, 1900".
Views
Replies
Total Likes
It has been over-complicated. All you need is:
$ = Num2Date(date() + 30, "MM/DD/YYYY")
Views
Replies
Total Likes
Exactly what I needed and it works perfectly! Thank you soooo much!
Views
Replies
Total Likes
I need this but in Java not FormCalc. Using the tools actionbuilder converts everything to java and nullifies FormCalc....blah
Views
Replies
Total Likes