Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field with the date / time format, and would like to make a conditional formatting, indepentende the day, month and year, if it occurred after 17hs it stays red, black if not, it's possible do this formatting?
Thank you.
Hi Gabriel,
As you say you have timestamp field like below time stamp formats
05/27/2014 17:33:01,2454
05/27/2014 17:34:01,245
05/27/2014 17:35:01,245
05/27/2014 11:33:01,56
Then try this expression by click + sign in the dimension
=if( Text(Time(Timestamp#(YourTimestampFieldHere,'mm/dd/yyyy hh:mm:ss'),'hh:mm:ss')) >= '17:01:00',Red(),Green())
Or
=if(Text(Time(YourTimestampFieldHere,'hh:mm:ss')) >= '17:01:00',Red(),Green())
Eg:-
=if(Text(Time(Timestamp#(TimeField,'mm/dd/yyyy hh:mm:ss'),'hh:mm:ss')) >= '17:01:00',Red(),Green())
Or
=if(Text(Time(TimeField,'hh:mm:ss')) >= '17:01:00',Red(),Green())
Write a expression for that and as you say you have the timestamp field then
If( YourfieldTimestampfield >= '17:00:00', Red(),Black())
use hour function
hour(/*DateField*/) will give you the hour.
so if(hour(/*DateField*/)>17, red(),black()) should do it for you.
Hi, thanks for reply.
I have the current field format as hh: mm: ss this is the correct format to compare?
Hi,
Is not a question about hour, but hour, minute and second, if the column is equal 17:01, the formatting color is red.
Hi Gabriel,
As you say you have timestamp field like below time stamp formats
05/27/2014 17:33:01,2454
05/27/2014 17:34:01,245
05/27/2014 17:35:01,245
05/27/2014 11:33:01,56
Then try this expression by click + sign in the dimension
=if( Text(Time(Timestamp#(YourTimestampFieldHere,'mm/dd/yyyy hh:mm:ss'),'hh:mm:ss')) >= '17:01:00',Red(),Green())
Or
=if(Text(Time(YourTimestampFieldHere,'hh:mm:ss')) >= '17:01:00',Red(),Green())
Eg:-
=if(Text(Time(Timestamp#(TimeField,'mm/dd/yyyy hh:mm:ss'),'hh:mm:ss')) >= '17:01:00',Red(),Green())
Or
=if(Text(Time(TimeField,'hh:mm:ss')) >= '17:01:00',Red(),Green())
Thanks!