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

changing numerical month into character

Thread began 5/08/2013 9:36 am by Jamie | Last modified 5/08/2013 11:43 am by Jamie | 437 views | 4 replies |

Jamie

changing numerical month into character

Hi Jason

Just wondering how I would get a date from, for example, 16-05-2013 which is selected from the datepicker to be formatted as 16 May 2013 - I have tried dd M yy but I get invalid format.

Also, I have been trying to change the datepicker style to 'flick' but for some reason cannot get it to change on the site.

Cheers

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

dd and yy are not valid formatting characters in PHP

the correct format would be d M Y:

<?php echo(date("d M Y", strtotime("16-05-2013"))); ?>


After changing the date picker style, make sure to upload the entire web assist folder to the server and do a hard refresh (hold the control key while pressing F5)

Sign in to reply to this post

Jamie

but what I am struggling to get is when I select from the datepicker, the date that is entered into the field (and into the database) is 16 May 2013 (or whatever date has been selected) so that I can use it in that format elsewhere

at the moment I can only have it formatted (at the moment) as dd-mm-yy - anything else and i get invalid format .....

Sign in to reply to this post

Jason ByrnesWebAssist

The date stored in the database must be in the format of yyyy-mm-dd hh:mm:ss

you cannot store dates into the database using the format you suggest.

the workaround is to use the date PHP function to convert the date on the pages where you show it.

Sign in to reply to this post

Jamie

gotcha... I see what you mean.

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