BETWEEN for two Date Columns TWX 9.1
Hi ,
I am looking to retrieve shiftName value from current datetime as below .
if Current date is between Start_Date and End_time then return shift name.
how to do it using query or any functions in TWX?

Thanks
Hi ,
I am looking to retrieve shiftName value from current datetime as below .
if Current date is between Start_Date and End_time then return shift name.
how to do it using query or any functions in TWX?

Thanks
Hi
Thanks for the reply.
Below code works for me..
var query = {
"filters":{
"type": "LT",
"fieldName": "Start_Date",
"value": date
}
};
var result1= Things["AAL.MPS.ShiftConfig.DT"].QueryDataTableEntries({
values: undefined /* INFOTABLE */,
maxItems: undefined /* NUMBER */,
tags: undefined /* TAGS */,
source: undefined /* STRING */,
query: query /* QUERY */
});
var query1 = {
"filters":{
"type": "GT",
"fieldName": "End_Time",
"value": date
}
};
// Provide your filter using the format as described in the help topic "Query Parameter for Query Services"
var params = {
t: result1 /* INFOTABLE */,
query: query1 /* QUERY */
};
var result2 = Resources["InfoTableFunctions"].Query(params);
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.