NAl
5 years agoContributor
Set Date to 1st of Current Month
I am trying to get the current date and convert it to the 1st of the current month of the current year.
The resulting format should be dd/mm/yyyy
SnapLogic doesn’t recognize this expression (even without the Date.parse):
Date.parse(Date.now().withDayOfMonth(1)+“/”+Date.now().getMonth()+“/”+Date.now().getFullYear()),"\ddMMyyyy")
Where am I going wrong with the syntax?
Hi @NAl ,
Try this expressionDate.now().withDayOfMonth(1).toLocaleDateTimeString({"format": "dd/MM/yyyy"})