Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

Julian Date for use in Document ID

Avatar

Level 2

Can anyone show me how I can convert a date field into a Julian date(YYDDD)? Essentially I just want to have this converted into a variable that I will concatenate with other values that will be used in generating unique doc ID.

Additionally anyone have thoughts on how I can ensure the doc ID is globally unique w/o using getUID?

I have never done anything with a Julian date before so I am at a loss.....

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

to display a julian date you can use the J symbol in your display pattern:

date{YYJ} to display January the 3rd 2015 as 153 (3rd day in 2015)

or

date{YYJJJ} to display January the 3rd 2015 as 15003 (with leading zeros)

To reuse the formatted Date in a script use the formattedValue instead of the rawValue.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

to display a julian date you can use the J symbol in your display pattern:

date{YYJ} to display January the 3rd 2015 as 153 (3rd day in 2015)

or

date{YYJJJ} to display January the 3rd 2015 as 15003 (with leading zeros)

To reuse the formatted Date in a script use the formattedValue instead of the rawValue.

Avatar

Level 2

‌radzmar,

WOW!! That was a lot simpler than I thought it would be.

Thanks for the help.

J

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now