• Resolved Frank J.

    (@frank-j)


    Hi Brian,

    in the documentation (https://noptin.com/guide/sending-emails/email-tags/) I read the following about the date tag:

    Displays today’s date, in the format set in your WordPress settings.

    My WordPress settings are “j. F Y” — which results in “1. April 2023”.

    The date in the admin notification mail I just created to get to know about new subscribers the result looks like this: “2023-04-01”.

    Where can/should I set the date format that fits?

    Cheers, Frank

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Frank J.

    (@frank-j)

    Any ideas regarding this?

    Plugin Author Brian Mutende

    (@picocodes)

    The date tag defaults to Y-m-d when used in automation rules so as to allow date based calculations in conditional logic.

    The next update will allow formatting and localizing the date and time.

    You’ll be able to use it like this:-

    [[date format="j, F Y" localized=1]]
    [[time format="g:i a" localized=1]]

    Or if you need to display a relative date and time…

    [[date relative="tomorrow" format="j, F Y" localized=1]]
    [[time relative="+3 hours" format="g:i a" localized=1]]

    You can add the following patch to your site if you wish to start using this immediately.

    https://github.com/hizzle-co/noptin/commit/2a38a04a1ae14314ac3c7f939ec0b98e495049dc

    Thread Starter Frank J.

    (@frank-j)

    Great! Thanks, Brian!

    Cheers, Frank

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[[date]]: Format?’ is closed to new replies.