And for the selection, I would use the RANGE function:
SELECT IF RANGE(datetime,DATE.DMY(3,12,2022)+TIME.HMS(23,30), DATE.DMY(4,12,2022)+TIME.HMS(1,30)).
No big issue, but RANGE is short and logical.
------------------------------
Robert Lundqvist
------------------------------
Original Message:
Sent: Sun October 06, 2024 10:29 PM
From: Jon Peck
Subject: Doing a Select using both Date and Time
The challenge would be how to write a datetime value to compare with the date variable.
Something like this would work for that expression
DATE.DMY(31, 1, 2000) + TIME.hms(22, 10).
for Jan 31, 2000 22:10
--
Original Message:
Sent: 10/6/2024 7:48:00 PM
From: David Winston
Subject: Doing a Select using both Date and Time
I am trying to do a select of records using both date and time using a DATE17 variable. The idea is that I want to select records that would cross both. An example would be selecting a range of records from December 3, 2022 11:30PM to December 4, 2022 1:30AM. I figured out how to do just the dates or do just the time, but I can't figure our how to do them together. Thanks
------------------------------
David Winston
------------------------------