Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

DateFormatter does nor work as expected

Adrian Gaberell August 14, 2025

Hi

I'm trying to create a specific Date in a Confleunce user-macro:

#set($dateString = "2025-01-01")
#set($dateFormat = $action.getDateFormat("yyyy-MM-dd"))
#set($date = $dateFormat.parse($dateString))
<p>date: $date .getTime()</p>

#set( $currentDate = $action.dateFormatter.getCalendar())
<p>currentDate: $currentDate.getTime()</p>

gives the following output:

date: $date .getTime()

currentDate: Thu Aug 14 08:43:04 UTC 2025

why is the 1st block with a "custom" date not working?

 

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.2.3
TAGS
AUG Leaders

Atlassian Community Events