How to calculate the day of the year
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 04:13 PM
How to calculate the day of the year
like
Today Tuesday October 24, 2023 is ...
Day 297
11 REPLIES 11
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 11:54 PM
@JPSS if your issue is resolved, please mark an answer Correct. This way the thread will be closed and it will help other users too. Also, this is a good practice to say Thank you to someone who has invested time to help you.
Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
18 hours ago
In case anyone is looking for brevity, the below gets the job done -
gs.print(Math.ceil(gs.dateDiff(gs.beginningOfThisYear(), gs.nowNoTZ(), true) / 3600 / 24));
