close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Format date on page - currently displaying Timestamp from MySQL

Thread began 2/27/2014 4:06 am by J7HNW | Last modified 2/27/2014 11:22 am by Jason Byrnes | 1397 views | 7 replies |

J7HNW

Format date on page - currently displaying Timestamp from MySQL

Hi I am having issues on a page which is listing a "last updated " time stamp field

It shows as for example ... 2014-01-29 13:53:07

I want it to show as 29/01/2014 and time if needed

I cannot see where to amend this field

Please can you help ??

Sign in to reply to this post

Jason ByrnesWebAssist

use the strtotime() and date() functions to convert the date


for example to convert 2014-01-29 13:53:07 to 29/1/2014 13:53:07, use:
<?php echo(date("d/m/Y h:i:s", strtotime($row_RecordsetName['ColumnName']))); ?>

Sign in to reply to this post

J7HNW

Hi Jason

Sign in to reply to this post

Jason ByrnesWebAssist

that doesn't make sense. add this to the page:

Date: <?php echo($row_WADAcards['LASTMODIFI']); ?><br />
Converted: <?php echo(date("d/m/Y h:i:s", strtotime($row_WADAcards['LASTMODIFI']))); ?><br />

and what does it show?

Sign in to reply to this post

J7HNW

Hi Jason

Sign in to reply to this post

Jason ByrnesWebAssist

you have that at the top of the page, you should be using it in the repeat region where the data is being displayed, see screen shot.

Sign in to reply to this post

J7HNW

Thank you Jason

Excellent support as always - thank you for your expertise

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

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...