I am updating the record, while updating under certain condition, I want to capture current date nad time. How can I do this. I am trying with various moment() function, but didn't get this.
1 Like
Thanks for the code ugo.
Anyway to add to that to show me the same date - 365 days?
For example
02-01-2023
02-01-2022
02-01-2021
Im querying a weather api to show the current weather today as well as the weather for the same day on past years.
I tried something like this but didn't seem to get it to work
{{ var startdate = moment().subtract(365, "days").format("DD-MM-YYYY") }}
Cheers