close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Changing the display of Date Text Fields

Thread began 7/09/2009 7:20 pm by tim383164 | Last modified 4/11/2013 9:17 am by Jason Byrnes | 2999 views | 5 replies |

tim383164

Changing the display of Date Text Fields

I have a user table (php MySQL) which has date of birth field. MySQL stores this as yyyy-mm-dd format.

After completing the DataAssist wizzard for this table, I want to display the birthdate field in dd/mm/yyyy format. (detail page.php) and be able to add/modify this in dd/mm/yyyy

I also created a Member registration pages (via Security Assist) and when the member goes to update their details, when the update page loads the users data from the table, by default the date is in standard yyyy-mm-dd format. How can this be changed to display in another format

I also want my users to add/modify their birthdate in dd/mm/yyyy format in the UpdateProfile page (created through SecurityAssist) - I have been playing with the validation toolkit, and can reformat the date field prior to submit back to yyyy-mm-dd format, but when the user reenters this page, it displays in yyyy-mm-dd format.

Sign in to reply to this post

CraigRBeta Tester

Haven't used dataassist, but to format a date in your mySQL query statement, do the following...

DATE_FORMAT(tblname.Datefield, '%e/%c/%Y') AS FormattedDatefield

for more formatting options, look at

date-and-time-functions.html#function_date-format

Sign in to reply to this post

Ray BorduinWebAssist

You can also use php. Instead of:

$_rowTable['field']

use:

date('d/m/Y',strtotime($_rowTable['field']))

Sign in to reply to this post
Did this help? Tips are appreciated...

msbannister373603

Datepicker prepopulate with current date

Is there a way to get Datepicker to display the current date in the text field upon page load. As of now, the default is blank and you have to choose today's date. Is there a way to prepopulate the field with the current date

Sign in to reply to this post

Jason ByrnesWebAssist

In code view, edit the date picker element and add a value:

php:
value="<?php echo(date("d/m/Y")); ?>"
Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...