Why a formula field which of "Date" return type returns different date when a "DateTime" field is used
|Knowledge Article Number||000181975|
|Description||I have a formula field in opportunity which is of return type "Date". The field's value is Account.LastModifiedDate or Any field name having DateTime field as data type.
But the formula is returning different value than the last modified date.
|Resolution||The return type of the formula field is "Date" and the field "LastModifiedDate" is a date time field. So when the formula converts the datetime value to date,it returns the corresponding date in GMT time zone.
This is the reason why there is a mismatch in field values.
To get the correct value in date field Workaround is as below: