Format Date functions must return empty string for NULL dates

By Elize van der Riet on 20 Jan

Each time I use a Format Date function; e.g. FormatShortDate(..) or FormatFullDate(..) I have to add an "If" to check for Null dates. If I do not do that the date string returned is the UTC base date of 1 January 1900, this is very disturbing to the customer to get this date where nothing was entered. So each time I do a date format I have to do:

SyntaxEditor Code Snippet

If(GetPreviousRecord.List.Current.SdBbbeeInitiatives.EndDate = NullDate(), "", FormatShortDate(GetPreviousRecord.List.Current.SdBbbeeInitiatives.EndDate, Site.DateSeparator))

It will be really nice if the date format functions did not return 1 Janauray 1900 if the date is NULL, but an empty string because that is representative of NULL (NO DATE) and not 1 January 1900.

J.21 Jan

Tbh, 

Most of those formatters I encapsulate in my own format-functions because they rare meet the customer's requirements.