# Subtract a lot of seconds from any date

## Answered: Subtract a lot of seconds from any date

From the Ext help I have thus far
Code:
`var dt1 = Ext.Date.add(new Date(1989,11,17,3,24,0);, Ext.Date.DATE, -5);`
but a guess is Ext.Date.DATE in the help is given Ext.Date.Day ,-5 to subtract 5 days. How can I use this method to convert strings ?

thanks

2. Like this?

Code:
```var seconds = 5 * 24 * 60 * 60 * -1; //5 days worth of seconds

var date = Ext.Date.add(new Date(1989,11,17,3,24,0), Ext.Date.SECOND, seconds);```

3. What do you mean convert strings?

4. Sorry I meant how can I convert a lot of seconds from this date. I have a chunk of seconds , here it tells me how to subtract 5 days. That doesn't help with my problem. How can I subtract seconds and be sure not to have a problem with leap years etc..

5. Like this?

Code:
```var seconds = 5 * 24 * 60 * 60 * -1; //5 days worth of seconds

var date = Ext.Date.add(new Date(1989,11,17,3,24,0), Ext.Date.SECOND, seconds);```

6. Once again you are right monsieur - thanks.

#### Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar