1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
692 views
by ron-s-6919 (4.5k points)
The Java documentation for the date and time formats include an uppercase 'Y' for the "week year".

See http://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html

I would like to format the date string with the "week year", but qie.formatDate() always uses the lowercase 'y' "year", even if I specify an uppercase 'Y'.

How can I format the date with a "week year"?

1 Answer

0 votes

To format the date with the "week year", you can use the following custom script:

var date = qie.deduceDate("12/31/2015");
var simpleDateFormat = new java.text.SimpleDateFormat("YYYYMMdd");
var weekYearDate = simpleDateFormat.format(date);
by ron-s-6919 (4.5k points)
...