MsgBox(Now.ToShortTimeString)'returns only current hour:min
MsgBox(CStr(TimeOfDay))'returns only current hour:min:sec PM/AM
MsgBox(DateAndTime.TimeOfDay.ToString)'returns only current Date hour:min:sec PM/AM
Dim T as Object
T= format(DateAndTime.TimeOfDay ,"hh:mm:ss tt")
'tt is for PM/AM
'you will have the time format that you like
Me.DataSet1.Customer.Compute("Sum(CustomerId)", "customerid>=1 and customerid<=500")