how do i convert a qie date value to pass to sql server query

0 votes
asked May 20, 2021 by nickie-l-1757 (200 points)
I'm trying to pass the QIE channel variable  last_run with value  '20210508103020123' to a sql that expects a date value

SQL server is not recognizing the value as a date string

what needs changing..thanks in advance

1 Answer

0 votes
You can format a date variable in QIE.

var myDate = qie.formatDate("yyyy-MM-dd", '20210508103020123');

Depending on the database field you may need a different format.
answered May 20, 2021 by michael-h-5027 (14,390 points)