Alberto Michelis Well-Known Member Licensed User Longtime User Jun 17, 2015 #1 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
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
P Picena Informatica Active Member Licensed User Longtime User Jun 17, 2015 #2 Newdata=Now - 60 * TicksPerDay Upvote 0
DonManfred Expert Licensed User Longtime User Jun 17, 2015 #3 B4X: Dim heute As Long = DateTime.Now Dim p As Period p.Days = -60 Log(DateTime.Date(DateUtils.AddPeriod(heute,p))) Upvote 0
B4X: Dim heute As Long = DateTime.Now Dim p As Period p.Days = -60 Log(DateTime.Date(DateUtils.AddPeriod(heute,p)))
Alberto Michelis Well-Known Member Licensed User Longtime User Jun 17, 2015 #4 THis neither B4X: 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
THis neither B4X: 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'
Alberto Michelis Well-Known Member Licensed User Longtime User Jun 17, 2015 #5 Alberto Michelis said: THis neither B4X: 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' Click to expand... sory, my fault, its DateTime.DateFormat="yyyy-MM-dd" Upvote 0
Alberto Michelis said: THis neither B4X: 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' Click to expand... sory, my fault, its DateTime.DateFormat="yyyy-MM-dd"