Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i have two date fields..
Sno Start Date End_Date Duration
1 12-sep-2016 12:00:32 AM 12-sep-2016 12:00:52 AM 00 hr : 00 min : 20 sec
2 12-sep-2016 02:20:02 PM 13-sep-2016 02:20:02 PM 24 hr : 00 min : 00 sec
3 13-sep-2016 06:20:02 PM 13-sep-2016 08:20:02 PM 02 hr : 00 min : 00 sec
4 13-sep-2016 06:20:02 AM 13-sep-2016 10:20:02 PM 16 hr : 00 min : 00 sec
Here, i want to display the background color as yellow which as duration of more than >10 hr between two given dates and Green color for the duration < 10 hr
Thanks..
Try this out -
script -
Duration expression -
only(Interval([End Date]-[Start Date],'hh:mm:ss TT'))
Background expression -
if(Duration>10/24,Yellow(),LightGreen())
Script
Load Sno,
Timestamp#([Start Date],'DD-MMM-YYYY hh:mm:ss TT') as [Start Date],
Timestamp#([End_Date],'DD-MMM-YYYY hh:mm:ss TT') as [End Date]
Inline [
Sno , Start Date , End_Date
1 , 12-sep-2016 12:00:32 AM , 12-sep-2016 12:00:52 AM
2 , 12-sep-2016 02:20:02 PM , 13-sep-2016 02:20:02 PM
3 , 13-sep-2016 06:20:02 PM , 13-sep-2016 08:20:02 PM
4 , 13-sep-2016 06:20:02 AM , 13-sep-2016 10:20:02 PM ];
Perhaps This
=If([Start Date] >= If(Match(Hour(Duration),'10 hr'),Duration),Yellow(),Green())
No.. this is not working.. i am getting green color background fr all the rows..
Can you please post the application
Try this out -
script -
Duration expression -
only(Interval([End Date]-[Start Date],'hh:mm:ss TT'))
Background expression -
if(Duration>10/24,Yellow(),LightGreen())
Script
Load Sno,
Timestamp#([Start Date],'DD-MMM-YYYY hh:mm:ss TT') as [Start Date],
Timestamp#([End_Date],'DD-MMM-YYYY hh:mm:ss TT') as [End Date]
Inline [
Sno , Start Date , End_Date
1 , 12-sep-2016 12:00:32 AM , 12-sep-2016 12:00:52 AM
2 , 12-sep-2016 02:20:02 PM , 13-sep-2016 02:20:02 PM
3 , 13-sep-2016 06:20:02 PM , 13-sep-2016 08:20:02 PM
4 , 13-sep-2016 06:20:02 AM , 13-sep-2016 10:20:02 PM ];
Thanks all for ur help