Tim,
I tried the following with no success:
vt_temp1:="{ts '2018-04-06:58:00'}"
vt_temp2:="{ts '2018-04-08:01:00'}"
Begin SQL
SELECT RecordID, Mach_ID, Energy_1, Energy_2, Energy_3
FROM DMM_TTX_HISTORIAN
WHERE TimeStamp>=:vt_temp1
AND TimeStamp <= :vt_temp2
INTO :al_temp1, :at_temp1, :ar_temp1, :ar_temp2, :ar_temp3
End SQL
Am I doing something wrong here?
You suggested using a C_DATE variable, but how would I set the time portion of
that variable? I'm specifically trying to query against both date & time.
Steve
-----Original Message-----
From: Timothy Penner [mailto:[email protected]]
Sent: Tuesday, July 10, 2018 1:18 PM
To: [email protected]; 4D iNug Technical <[email protected]>
Subject: RE: SQL Statement Assistance
How about?
- Using the TS syntax as described here:
http://kb.4d.com/assetid=75947
- Using CAST to cast the TEXT as a Timestamp:
http://doc.4d.com/4Dv15/4D/15/CAST.300-2288162.en.html
http://kb.4d.com/assetid=75047
- Using a C_DATE variable instead of a _CTEXT variable
-Tim
Timothy Penner
Senior Technical Services Engineer
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************