If I set the Object Value Type of a Date/Time field to "Calculated-Read Only" am I stuck with YYYY-MM-DD HH:MM:SS format?
Why do my changes in Pattern Data/Display have no effect?
I would like to have the calculated date/time displayed automatically (this is working OK) and I would like the date format to be compatible with company policy which is MM-DD-YYYY.
Any thoughts?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
If you amend your FormCalc to this, you should be okay:
$.rawValue = num2date(date(), "MM-DD-YYYY")
Hope that helps,
Niall
Views
Replies
Total Likes
Hi,
If you amend your FormCalc to this, you should be okay:
$.rawValue = num2date(date(), "MM-DD-YYYY")
Hope that helps,
Niall
Views
Replies
Total Likes
I am new to this. So, I don't know how or why it works, but it works! Thanks
p.s. btw, if I want to add the time, do I do it on a separate line or can I append to it.
Views
Replies
Total Likes
Sorry for the delay!
You can achieve this in one line, but you need to deal with the date using num2date and the time with num2time (see Help) and then using the Concat FormCalc method to join the two answers:
$.rawValue = Concat(num2date(Date(), "MM-DD-YYYY"), " ", num2time(Time(), "HH:MM:SS"))
Hope that helps,
Niall
Views
Replies
Total Likes
No problem...Thanks for all your help!
Views
Replies
Total Likes
Im a complete noob at this program (and scripting in general)
How do I amend the FormCalc? I cant find anywhere where I can do this.
Thanks.
Views
Replies
Total Likes
Under the menu bar (in the center) you will see a downward pointing arrow, if the scripting window is not already open, click on arrow to open the scripting window. In the Language dropdown menu, choose FormCalc. See screen cap below (click to enlarge). Hope this helps.
Views
Replies
Total Likes
Views
Likes
Replies