Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've tried the following in my script:
Started as SessionStart,
date(makedate(Year(Started),Month(Started)),'YYYY-MMM') as Chat_Resp_YrMon,
This is the result:
What do I need to do to roll up my data to yyyy-mmm? My end goal is to show sessions in the month on a graph
Hi John,
if You set in Script Your Format Timestamp like this
SET TimestampFormat=YYYY-MM-DD hh:mm:ss[.fff]'; // or YYYY-DD-MM
then
LOAD Date(Floor(Date(Started)),'YYYY-MMM') as Chat_Resp_YrMon
Regards,
Antonio
can you a send a sample of your data.
Sorry, this did not work...I get the same result:
SET TimestampFormat = 'YYYY-MM-DD hh:mm:ss[.fff]';
LOAD Started as SessionStart,
Date(Floor(Date(Started)),'YYYY-MMM') as Chat_Resp_YrMon,
Date(Floor(timestamp#(Started,'YYYY-MM-DD hh:mm:ss')),'YYYY-MM') as Chat_Resp_YrMon
ex:
=Date(Floor(timestamp#('2017-02-03 00:56:2','YYYY-MM-DD hh:mm:ss')),'YYYY-MM')
Same result, it does not recognize the year:
LOAD Started as SessionStart,
Date(Floor(timestamp#(Started,'YYYY-MM-DD hh:mm:ss')),'YYYY-MM') as Chat_Resp_YrMon,
Send the data sample then will offer guided help
Sorry, I am not sure how to do that.
It works fine with your sample date(please see attached)
Try this
Date(MonthStart(TimeStamp#(Started, 'YYYY-MM-DD hh:mm:s')), 'YYYY-MMM') as Chat_Resp_YrMon