Forum Discussion
SSJ011
5 years agoFrequent Visitor
Create Calculated column to get the correct date
Hi, Want to get the correct date from the completion date and Time with one condition. if the date & time is before 6:30 AM in the Completed column then the calculated column should take yes...
Anonymous
5 years agoNot applicable
Hello,
You can use this conditional in a calculated column to get the correct date:
=IF(TIME(HOUR([Completed Date]),MINUTE([Completed Date]),SECOND([Completed Date]))<TIME(6,30,0),[Completed Date]-1,[Completed Date])
And if you want the correct date to have no time, you could use this:
=IF(TIME(HOUR([Completed Date]),MINUTE([Completed Date]),SECOND([Completed Date]))<TIME(6,30,0),[Completed Date]-1-TIME(HOUR([Completed Date]),MINUTE([Completed Date]),[Completed Date]-TIME(HOUR([Completed Date]),MINUTE([Completed Date]))
Regards
Jesus