To get previous day timestamp of a timestamp value in java
807591May 9 2008 — edited May 12 2008Hi,
I have a timestamp variable, say settledTimeStamp which is passed as a runtime argument to a query. I should also send another timestamp variable say previousTimeStamp whose value should be previous day timestamp, ie for settledTimeStamp.
For example,
Todays date= May 9th 2008.
say settledTimeStamp to May 7th 2008.
I should get the timestamp value for previous day to SettleDate i.e May 6th, 2008.
I am showing this as an example because I tried with Calendar options too but it takes current timestamp and gives previous days timestamp which is not the same as I required. Like it returns May 8th as my previousTimeStamp if I work with Calendar options....
Can anyone help me on this?