I've been searching and searching for this answer.
I have a Date field in a form on LiveCycle.
This is not a field that anyone enters the date, but it simply puts the current date in.
I would like it to keep the 0's in the format. So if the date is 01/08/2014, I want it to read as this, not 1/8/14.
I'm using this value in an invoice field where I am concating two fields together and I want the 0's to stay.
Any help would be great. Thanks!
Views
Replies
Total Likes
Hi,
you need to define a display pattern for the date field, to get the desired formatting.
Add this display pattern to your field.
date{MM/DD/YYYY}
Views
Replies
Total Likes
I tried this earlier and again just now and it refuses to put the zeros in.
When I test the form it still comes up, 1/8/14.
Views
Replies
Total Likes
How do you populate the date?
Views
Replies
Total Likes
It's a Calculated - Read Only field and I use FormCalc
$.rawValue
= num2date(date(),
DateFmt(1))
Views
Replies
Total Likes
Ok, that's the reason why the date is displayed in that way.
DateFmt(1) returns the short style M/D/YY.
Use DateFmt(2, $.locale) instead.
Views
Replies
Total Likes
That makes sense, is there a table somewhere that explains all the Date Formats?
This is now saying Jan 8, 2014.
Views
Replies
Total Likes
Hi,
this function is described in the FormCacl reference manual.
Views
Replies
Total Likes
Thank you for your help.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies