Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

field.formattedValue returns a Date not String ... WHY?


Level 1


I have a date field.

I just wanted to know what is the difference between the below field properties?

Field Name = ReceivedDate

1. ReceivedDate.rawValue

2. ReceivedDate.formattedValue

On my machine, ReceivedDate.formattedValue retruns STRING value (if I use typeof ) but on other machine the same code throws  error.

I am assuming it is returning Date because of which typeof throws error.

Is ReceivedDate.formattedValue system depenedent?

I changed system clock formats and application stopped couple of times (different date formats).

Its very urgent, please help.

2 Replies


Level 6

Since this relates to a form you created in LiveCycle Designer, I'm going to move it to that forum: LiveCycle Designer


Level 10


The formattedValue will be a string but it's format may differ depending on the locale set on the computer, it the locale has not been set for the field or the form it will default to the host locale.   You can use xfa.host.language to get the system locale.