Log(ValidateMyDate(2018,1, 23, 17, 10, 0) ) 'true code run around 6 PM EST
Log(ValidateMyDate(2018,1, 22, 17, 10, 0) ) 'false
Log(ValidateMyDate(2018,1, 23, 1, 0, 0) ) 'true
Sub ValidateMyDate(y As Int,m As Int, d As Int, h As Int, n As Int, s As Int) As Boolean
Dim p As Period
p.Days = -1
Dim DateStart As Long = DateUtils.AddPeriod(DateTime.Now, p)
Dim DateEnd As Long=DateTime.Now
Dim DT As Long=DateUtils.SetDateAndTime(y,m,d,h,n,s)
If DT>=DateStart And DT<=DateEnd Then Return True Else Return False
End Sub