Date Format

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1855
    wise
    Participant

    Hello, I see the date on the invoice is Month/date/year,
    where is a file I can edit to modify it?

    #1856
    RRowley
    Participant

    Refer to the Invoice Templates & Styles topic on the left menu. It explains how you can create your own, personalized printed/pdf invoice template. This allows you to personalize the output as you need to. Also, you can try out other templates included with SI by selection in SI Defaults setting.

    #1869
    wise
    Participant

    Hello,
    I found it the file public_html\invoices\templates\invoices\default\template.tpl and also the code:
    field=$invoice.date|utilDate
    But how can I change the format?
    I was expecting something like
    date_format($date,”Y/m/d H:i:s”);
    any indication?
    Thank you

    #1870
    RRowley
    Participant

    Look in the Inc/Claz/Util.php file. Find the date method. Notice in the comments the supported date formats. Say you want the long format (ex: May 8, 2024). In the field you mentioned you would have:

    field=$invoice.date|utilDate:long

    If you need a format other than those in the Util::date method, you would need to implement extension code to do it. View the Extensions topic.

    #1871
    wise
    Participant

    Great! It works perfectly!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.