DateTool adding a year
Please see the attached. I'm using dateObj to pull the date from the data definition calendar. The date is correct in the xml output. However, when I use the DateTool to display it in another format, it is adding one year to the date. For the life of me I can't figure this one out.
Jim
- script.txt 1.12 KB
- xml-eg.xml 2.37 KB
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by steelej on 14 Jan, 2015 07:13 PM
It seems to be adding a month too. I must be misusing the DateTool but I don't see it yet.
2 Posted by Ryan Griffith on 14 Jan, 2015 07:37 PM
Hi Jim,
I am curious if the format you are passing into the
toDate
method needs some adjustment to account for leading zeros. When you have a moment, try the following and let me know how it works out:Please let me know if you have any questions.
Thanks!
3 Posted by steelej on 14 Jan, 2015 07:44 PM
That was it. Thanks for your help.
Jim
steelej closed this discussion on 14 Jan, 2015 07:44 PM.