1
How do I subtract thirty days from a given date, assuming in the field DT_VENC it informs the date of a maturity and in the field DT_AVISO return the date 30 days before the informed, in the format dd/mm/aaaa
?
1
How do I subtract thirty days from a given date, assuming in the field DT_VENC it informs the date of a maturity and in the field DT_AVISO return the date 30 days before the informed, in the format dd/mm/aaaa
?
-3
var DT_VENC = new Date();
var DT_AVISO = new Date().setDate(DT_VENC.getDate() - 30).toLocaleString("pt-BR");`
Browser other questions tagged javascript
You are not signed in. Login or sign up in order to post.
yeah, duplicate, but the answer there is equally bad the ones that tried to give here.
– jsbueno
I put an answer that gives the correct values in the other question. It would be nice if someone took a look, because without any vote people will end up using the incorrect answer that is accepted there.
– jsbueno
Oops, that’s right! Thank you.
– Ju Meyer