Can someone please guide how to retrieve yesterdays date and time ?
Date1. Yesterday date and 8:00 am time
Date2. the current date and time
I need to generate a query like "Select * from datemaster where invdate between date1 and date2
Using the above code I am able to get the yesterdays date, but I need to set the yesterdays time as 8.00 am.
Date1. Yesterday date and 8:00 am time
Date2. the current date and time
I need to generate a query like "Select * from datemaster where invdate between date1 and date2
B4X:
Dim date2 As Long = DateTime.Now
Dim date1 As Long
Dim p1 As Period
p1.Days = -1
date1= DateUtils.AddPeriod(date2, p1)