Dates

4 posts by 3 authors in: Forums > CMS Builder
Last Post: July 12, 2011   (RSS)

Re: [design9] Dates

By Damon - July 12, 2011

Hi April,

What about passing the current date as a hidden field in the comments form?
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Damon] Dates

By design9 - July 12, 2011

Yes, but I can't figure out how to display the date the form was submitted and not today's date
. Do you know what code to use to display the date the form was submitted?

Thanks!

April

Re: [design9] Dates

By Jason - July 12, 2011

Hi April,

You can format and display dates stored in the database using the date() and strtotime functions.

For example, if you wanted to display the value of the field createdDate, you could use something like this:

<?php echo date("m-d-Y", strtotime($record['createdDate'])); ?>

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/