Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

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.