Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I need to load a table which has a time stamp that doesn't match how the it should be formatted.
Also, I want to be able to limit how many days back I load.
This is how the "date" looks like on the MongoDB:
3/1/2020, 12:00:03 AM
And this is the code:
Let vEndDate = text(date((Today()-2), 'YYYY-MM-DD hh:mm:ss'));
LOAD _id,
if([value] > 0.0,[value]) as bat%,
agv as batAGV,
[time] as batTimestamp,
loop as batLoop;
[agvBatteryLevel]:
SELECT [_id],
[value],
agv,
[time],
loop
FROM faults.agvBatteryLevel WHERE ( [time] > '$(vEndDate)' );;
Any help would be appreciated.
Thank you