close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Time element

Thread began 2/20/2011 6:53 pm by reseller218363 | Last modified 2/23/2011 10:57 am by Jason Byrnes | 1070 views | 5 replies |

reseller218363

Error

I'm currently having code problem with my search result page. The time field element is displaying incorrectly.

When I insert time (04:00 PM) into the time field. The result.php display it like this (04:00 am) it seem like (am) is the defaults.

Please help.
Sharach

Sign in to reply to this post

Jason ByrnesWebAssist

the MySQL Time column type takes the time in the following form at:
hh:mm:ss

it does not recognize am or pm, the time is in 24 hour format, 4:00pm should be sent tot the database as 16:00


if you wish to use 4:00pm in the database, you should be using a varchar column type, not a time column type.

Sign in to reply to this post

reseller218363

AM/PM Format

Hello Jason,

I’m currently working with a sport schedule website, the admin inserts sports schedule in backend of the site and clients search the schedule and than print out a copy.

The problem is when the admin enter the schedule information including the date into the database as 10:00 PM and submit the data. The update.php / result.php pages output and display as 10:00 am instead of 10:00PM.


Ray Borduin had helped me with these issues, but some how doing the testing I find out that the display were incorrect.

Technical Support Ticket # 123060
Technical Support Ticket # 123143
Technical Support Ticket # 123479

Sign in to reply to this post

Jason ByrnesWebAssist

it is because you are using a time column type.

use a varchar column type instead.

Sign in to reply to this post

reseller218363

AM/PM Format

Thanks Jason,

I change the column type to varchar and it working.

I want to force the pm column to be UPPERCASE but can't figure out how to do it. Any help is GREATLY appreciated << ...


Thanks
Sharach

Sign in to reply to this post

Jason ByrnesWebAssist

dont worry about the format in the database, force it to upper case when displaying it on the page at run by using strtoupper():

<?php echo strtoupper($row_RecordsetName['ColumnName']); ?>

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