Expand my Community achievements bar.

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

Avatar

Level 1

Hi,

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

Avatar

Level 6

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

Avatar

Level 10

Hi,

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.

Regards

Bruce