How can I go back in time?

newbie-question

#1

Look for some help.

I’ve created a case to set a date 7 days in the past.
[[Now.addDays(-LVAR1)]]

But it previews like this.
Fri Jan 26 2018 13:35:31 GMT+0000 (GMT Standard Time)
Does anyone know how I can get the date as DD/MM/YYYY


#2

Hi!

This expression will give you the date in that format:

[[Now.addDays(-LVAR1).getDate()]]/[[Now.addDays(-LVAR1).getMonth()]]/[[Now.addDays(-LVAR1).getFullYear()]]

This version has leading zeros on the month and day portions, when needed:

[[“0”.concat(Now.addDays(-LVAR1).getDate()).slice(-2)]]/[[“0”.concat(Now.addDays(-LVAR1).getMonth()).slice(-2)]]/[[Now.addDays(-LVAR1).getFullYear()]]


Show current european date
#3

Thank you so much. This has done the job perfect.