Jump to content

Wrong date format


hanstavo

Recommended Posts

On 22/10/2018 at 16:28, hanstavo said:

Im in whmcs 4.6

i'm going to assume you mean v7.6 🙂

On 22/10/2018 at 16:28, hanstavo said:

when using the {$date} I have date format set to Monday January 1st, 2018 but it comes out as Monday 1st January 2018 

where are you seeing this? off-hand, I know {$date} is used in viewinvoice.tpl (Tuesday, October 23rd, 2018) and the email templates (Tuesday, 23rd October 2018) - you could argue that the output inconsistency between them is a bug, but either could be fixed in the template if necessary.

e.g in the email template, changing {$date} to the code below would change the format to Tuesday, October 23rd, 2018

{$date|date_format:'l, dS F, Y'}
Link to comment
Share on other sites

8 hours ago, brian! said:

i'm going to assume you mean v7.6 🙂

where are you seeing this? off-hand, I know {$date} is used in viewinvoice.tpl (Tuesday, October 23rd, 2018) and the email templates (Tuesday, 23rd October 2018) - you could argue that the output inconsistency between them is a bug, but either could be fixed in the template if necessary.

e.g in the email template, changing {$date} to the code below would change the format to Tuesday, October 23rd, 2018


{$date|date_format:'l, dS F, Y'}

Thank You! And yes I did mean v7.6 sorry.

Link to comment
Share on other sites

19 hours ago, brian! said:

 


{$date|date_format:'l, dS F, Y'}

That doesn’t work, it just makes the whole email template disappear and send it in plain text... It might help to note that 1) I am using version 6.4 not 7.4, and that I am using the main email header (In general settings) Also is the a {smarty.now|date_format} That can use this date format as smarty.now for yours isnt working.

Link to comment
Share on other sites

19 hours ago, brian! said:

 


{$date|date_format:'l, dS F, Y'}

That doesn’t work, it just makes the whole email template disappear and send it in plain text... It might help to note that 1) I am using version 6.4 not 7.4, and that I am using the main email header (In general settings) Also is the a {smarty.now|date_format} That can use this date format as smarty.now for yours isnt working.

 

 

I solved it with:

{php} echo date("l, F dS, Y", time()); {/php}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated