Closed HenryTaylor closed 7 years ago
Hi Henry,
I just tested with the latest release.
REALDATE_1.initialize(2017, 2, 1); var mask="mmm dd, yyyy"; var date = REALDATE_1.formatWithMask(mask, true); APPLICATION.alert(date);
That prompted me with Feb 01, 2017. So I would like to ask you to make sure you have the latest release of the repository installed. There were some fixes to the date component last year.
Kind regards Martin
I do have the most recent version. I'm very confused right now, though. I tried your code and it worked fine. So, I went back to my original code and it too works fine now. I know what I saw before, but I cannot reproduce those results. Man, it's things like this that really make you doubt your sanity.
Anyway, thanks for the response, and I guess there isn't a problem after all.
My first guess would be that your months were starting from 0: So index 0 would be January instead of 1. Something like that.
Thanks for replying.
Kind regards Martin
Design Studio 1.6 SP2 SCN Community Extensions 3.0
I have the following code that defines a date object:
When the value returned from the Datasource is '01/01/2017', this all works okay. But, when the value is "02/01/2017", the value of glblEndDate at the end of the code is "Mar 01, 2017", when it should be "Feb 01, 2017". It doesn't appear to me that the REALDATE.intialize() function is handling February properly. Even if I hard code the values, REALDATE.initialize(2017, 2, 1), the value of glblEndDate at the end is March.