Android Question DateUtils help

Alberto Michelis

Well-Known Member
Licensed User
Longtime User
Before someone tells, yes I search the forum and did not realized how to do ii.

I need to substract 60 day to now, how to do it?

NewDate = Now - 60

Thanks
 
Code: Copy
    Dim heute As Long = DateTime.Now
    Dim p As Period
    p.Days = -60
    Log(DateTime.Date(DateUtils.AddPeriod(heute,p)))
 
Upvote 0
THis neither
Code: Copy
            DateTime.DateFormat="yyyy-mm-dd"
            Dim hoy As Long = DateTime.Now
            Dim p As Period
            p.Days = -60
            DateTime.Date(DateUtils.AddPeriod(hoy,p))
Results in '2015-10-18'
 
Upvote 0
Back
Top