Announcement

Collapse
No announcement yet.

default date value

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • default date value

    Within a template, I have a form. One of the fields is a date field, and I would like to make the field default to the day's date in the format yyyy-mm-dd

    I am not even sure where to begin. Can somebody get me started please?

    Thank you,
    Amy
    http://www.eaforums.com

  • #2
    To get todays date or "right now's" time, use the date function, but without a timestamp:
    http://www.php.net/manual/en/function.date.php

    For what you need, use this:
    PHP Code:
    $todaysdate=date("Y-m-d"); 
    and voila.
    Chen Avinadav
    Better to remain silent and be thought a fool than to speak out and remove all doubt.

    גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

    Comment


    • #3
      Thank you. I got it working

      Amy
      http://www.eaforums.com

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X