Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Am used the below logic at script level to get the time format,
Script level: 'Time(Time#(BGCMTM, 'hhmmss'), 'hh:mm:ss') as Reporting_Time'
But am getting an issue like as below(For 8:00:00 and 9:00:00 times were missing but in bakend it is available).
Thanks..
May be try this:
Time(Time#(BGCMTM, 'hmmss'), 'hh:mm:ss') as Reporting_Time
Time(Time#(Num(BGCMTM, '000000'), 'hhmmss'), 'hh:mm:ss') as Reporting_Time
try this
TimeStamp(
Alt(
TimeStamp#(Field,'hhmmss'),
TimeStamp#(Field,'hh:mm:ss')
),
'hh:mm:ss'
) as NewTime
May be try this:
Time(Time#(BGCMTM, 'hmmss'), 'hh:mm:ss') as Reporting_Time
Time(Time#(Num(BGCMTM, '000000'), 'hhmmss'), 'hh:mm:ss') as Reporting_Time
sample PFA
LOAD *,TimeStamp(
Alt(
TimeStamp#(Date_Value,'hhmmss'),
TimeStamp#(Date_Value,'hh:mm:ss')
),
'hh:mm:ss'
) as New_Date_Value;
Load * inline [
Date_Value
231000
231212
231222
231138
231039
];
Hi Sunny,
It results as below which not good.
The business starts at 8:00 and ends at 18:00 here we need to capture the traffic count for every hour.
Thanks..
Do you want to round down each time to its nearest hour?
Hi Sunny,
My apologies actually i have used the below logic
Time(Time#(BGCMTM, 'hmmss'), 'hh:mm:ss') as Reporting_Time
The below logic is working
Time(Time#(Num(BGCMTM, '000000'), 'hhmmss'), 'hh:mm:ss') as Reporting_Time
Thanks..
Hi,
We can round this each hour by using below logic,
if(right( Time(Time#(Num(BGCMTM, '000000'), 'hhmmss'), 'hh:mm:ss'),2)='00', Time(Time#(Num(BGCMTM, '000000'), 'hhmmss'), 'hh:mm:ss')) as new_Time
Thanks..
That is not rounding, rounding can be done like this may be:
Time(Floor(Time#(Num(BGCMTM, '000000'), 'hhmmss'), (1/(24*60))), 'hh:mm:ss') as New_Time
Hi Sunny,
It's not rounding
Time(Floor(Time#(Num(BGCMTM, '000000'), 'hhmmss'), (1/(24*60))), 'hh:mm:ss') as New_Time
Thanks..