Sidebar

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

0 votes
334 views
asked Mar 16, 2016 by ron-s-6919 (4,140 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);
answered Mar 16, 2016 by ron-s-6919 (4,140 points)
...