Skip to content

Instantly share code, notes, and snippets.

@j-schreiber
Created July 9, 2020 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j-schreiber/2861f84526f53f91d8d7b0870e8592aa to your computer and use it in GitHub Desktop.
Save j-schreiber/2861f84526f53f91d8d7b0870e8592aa to your computer and use it in GitHub Desktop.
Date formatter property of pdf template
public static String DateFormatting {
public get {
if (DateFormatting == null) {
if (String.isNotBlank(Template.DateFormatting__c)) {
DateFormatting = '{0, date, '+ Template.DateFormatting__c +'}';
} else {
DateFormatting = '{0, date, dd.MM.yyyy}';
}
}
return DateFormatting;
}
private set;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment