Custom field date uses different date format than the date format set in general settings

I’ve made a custom field with “delivery date”
My date format is set to: in the invoiceplane settings.
For the due date and invoice date, this works perfectly.
And if I download the PFD straight from invoiceplane when I’m in the invoice editor it also works.
BUT when I send an email out to a client, the PDF attached in the email displays the date format of my custom field as
When I use the guest link, it doesn’t show the custom field at all.
And when I hit “generate pdf” in the guest link, it also generates a pfd with the custom field date in the format…
Anyone has an idea of how i can fix this? With the 2 date formats this looks confusing and unprofessional to clients…

I used the following code in my invoice template:
(leverdatum being my custom field which translates to delivery date)

<?php echo date_from_mysql($custom_fields['invoice']['Leverdatum']); ?>



Normally it should work.
What version are you on?
i tried replicating the issue and i got the date right.
Fresh install applied the 10-4-2018 in settings as date format.
Added custom field and your code to the template.


Thanks for the report, added a ticket for this:

Indeed it seems only with invoices in attachment.
To add delivery date to the guest url go to:
application -> views -> invoice temp -> public -> .php file
add the same line to show it.
Also it show the date correctly it is only on email invoices.

I did test that and it is working correctly.

<?php echo $custom_fields['invoice']['Sent at']; ?>


<?php echo date_from_mysql($custom_fields['invoice']['Sent at']); ?>

For me it still doesn’t work in the pdf attached to emails… It does work when you download it straight from invoiceplane or download it via the guestlink

<?php if ($invoice->client_birthdate) { echo date_from_mysql($invoice->client_birthdate); } elseif ($invoice->client_id) { echo " none "; } I got it working with this code, if you still alive :)