I have a JSL script that opens a SQL database and then processes the data for various purposes. My challenge is passing a date variable to the Open Database command to further refine the automation of the process. I've tried a whole host of options for trying to do this, but nothing has worked so far. Does anyone have any suggestions for how I can replace the Date_Time value listed in the Open Database command with the variable datetime shown below?
datetime = "2021-08-01";
// Program opens diagnostic SQL data table for all instruments
dt.db_diag = Open Database(
"DSN=AQM;Description=AQM;UID=sa;PWD=LKJDFDF;Trusted_Connection=No;APP=JMP;WSID=TESTPC;DATABASE=EnvidasConfig;",
"SELECT * FROM [dbo].MonitorDiagnosticsData WHERE Date_Time >= '2021-08-18'"
);