-
Re: Time Buckets Syntax Error !!!!
kaan erisen Mar 10, 2017 2:50 AM (in response to Chanin D'Souza )Hi,
You send 'HH' as parameters but which function
Interval(if((Date((now()),'HH')-Date(Date#(AND_allocatedDate2,'DD-MM-YYYY hh:mm:ss TT'),'HH'),'HH') < 1,'< 1 hour',
if((Date((now()),'HH')-Date(Date#(AND_allocatedDate2,'DD-MM-YYYY hh:mm:ss TT'),'HH'),'HH') < 2,'< 2 hours',
if((Date((now()),'HH')-Date(Date#(AND_allocatedDate2,'DD-MM-YYYY hh:mm:ss TT'),'HH'),'HH') < 3,'< 3 hours',
if((Date((now()),'HH')-Date(Date#(AND_allocatedDate2,'DD-MM-YYYY hh:mm:ss TT'),'HH'),'HH') < 4,'< 4 hours','> 4hours')))))
I assume you are trying to send it to the interval function
Maybe you try this :
if(Interval(Date((now()),'HH')-Date(Date#(AND_allocatedDate2,'DD-MM-YYYY hh:mm:ss TT'),'HH'),'HH') < 1,'< 1 hour',
if(Interval(Date((now()),'HH')-Date(Date#(AND_allocatedDate2,'DD-MM-YYYY hh:mm:ss TT'),'HH'),'HH') < 2,'< 2 hours',
if(Interval(Date((now()),'HH')-Date(Date#(AND_allocatedDate2,'DD-MM-YYYY hh:mm:ss TT'),'HH'),'HH') < 3,'< 3 hours',
if(Interval(Date((now()),'HH')-Date(Date#(AND_allocatedDate2,'DD-MM-YYYY hh:mm:ss TT'),'HH'),'HH') < 4,'< 4 hours','> 4hours'))))
-
Re: Time Buckets Syntax Error !!!!
Chanin D'Souza Mar 10, 2017 3:25 AM (in response to kaan erisen)NO its only giving the ANSWER '> 4 hours' and if I'm Tweaking up the equation (changing the DD-MM-YYYY to MM/DD/YYYY format) it's giving the answer '< 1 hour'
-
Re: Time Buckets Syntax Error !!!!
kaan erisen Mar 10, 2017 3:31 AM (in response to Chanin D'Souza )can you share a sample qvf?
-
Re: Time Buckets Syntax Error !!!!
Karthik Srinivasan Mar 10, 2017 4:13 AM (in response to Chanin D'Souza )if(Date(Date((now()),'HH')-Date(Date#(AND_allocatedDate2,'DD-MM-YYYY hh:mm:ss TT'),'HH'),'HH') < 1,'< 1 hour',
if(Date(Date((now()),'HH')-Date(Date#(AND_allocatedDate2,'DD-MM-YYYY hh:mm:ss TT'),'HH'),'HH') < 2,'< 2 hours',
if(Date(Date((now()),'HH')-Date(Date#(AND_allocatedDate2,'DD-MM-YYYY hh:mm:ss TT'),'HH'),'HH') < 3,'< 3 hours',
if(Date(Date((now()),'HH')-Date(Date#(AND_allocatedDate2,'DD-MM-YYYY hh:mm:ss TT'),'HH'),'HH') < 4,'< 4 hours','> 4 hours'))))
You had missed 'Date' (the first date in this expression i've noted above)
-
Re: Time Buckets Syntax Error !!!!
Chanin D'Souza Mar 10, 2017 4:46 AM (in response to Karthik Srinivasan )No, it isn't working
-
Re: Time Buckets Syntax Error !!!!
Karthik Srinivasan Mar 10, 2017 5:20 AM (in response to Chanin D'Souza )Hi,
The If condition should work as noted in my post above.
The problem could be with the Interval statement. It accepts an expression that can be formatted as a time. I don't think the '<1 hour', '<2 hours' etc satisfy this.
Instead if you just keep '1','2', it may work.
-
-
-
-
-
Re: Time Buckets Syntax Error !!!!
Vineeth Pujari Mar 10, 2017 4:21 AM (in response to Chanin D'Souza )Try like below
=Pick(Interval(Date((now()),'HH') -
Date(Date#(AND_allocatedDate2,'DD-MM-YYYY hh:mm:ss TT'),'HH'),'H'),
'<1 Hr','<2 Hr','<3 Hr','<4 Hr')