ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Display Current Date and Time

July 28, 2010 12:42pm

Subscribe [5]
  • #1 / Jul 28, 2010 12:42pm

    SpectraDisplays

    24 posts

    I’m sure this is here somewhere, but I have searched and cannot find it.

    How do I insert the current date, so whenever the page is shown the current date is shown?

    Thanks

  • #2 / Jul 28, 2010 2:01pm

    lebisol

    2234 posts

    {current_time}...just format it how you like.

  • #3 / Jul 28, 2010 2:14pm

    Ingmar

    29245 posts

    What lebisol says 😊 Thanks for the assist.

  • #4 / Jul 29, 2010 3:11am

    SpectraDisplays

    24 posts

    thats great - thanks.

    Can I format it?  I’ve found lots of formatting commands, but I’m not sure how to use them within the string

    thanks 😊

  • #5 / Jul 29, 2010 3:16am

    SpectraDisplays

    24 posts

    sorry, just found the example on formatting…

    {date format="%F %d %Y"}

    but when I insert it into my template, I get exactly above, not the date inserted 😖 Im a newbie (does it show lol) what am I doing wrong?

    thanks, and sorry for asking what are probably very stupid questions :red:

  • #6 / Jul 29, 2010 3:23am

    John Henry Donovan

    12339 posts

    SpectraDisplays,

    Try this

    {current_time format="%D, %F %d, %Y - %g:%i:%s"}

    EE Docs : Date Variable Formatting

  • #7 / Jul 29, 2010 5:22am

    SpectraDisplays

    24 posts

    Thats the one - Thank You 😊

  • #8 / Jul 29, 2010 12:16pm

    Sue Crocker

    26054 posts

    Glad you have an answer. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases