+ Start a Discussion
sryansryan 

Forula Field for calculating Day Shift and Night Shift from Date/Time Fields

I would appreciate any ideas of suggestions for writing a Fomula that looks at two fields (Date/Time Fields) and then sets a Text value (maybe  a Case statement) of "Day Shift" or "Night Shift" as follows:

Day Shift = 6 am to 6 pm (with same day)
Night Shift = 6 pm to 6am (across 2 days)

Thanks in advance for any ideas about ways to do this.

Sean
Ashish_SFDCAshish_SFDC
Hi Syran, 


Please post the exact requirement - there should be a way possible by getting the fields into the Formulas. 


Regards,
Ashish
AgiAgi
Hi,

this is checking if start date end date are on the same day,

If( Datevalue(Shift_Start__c)=Datevalue(Shift_End__c), "Day Shift", "Night Shift")