close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Date fields not updating properly.

Thread began 10/26/2015 9:34 am by sandy170299 | Last modified 10/26/2015 2:27 pm by Ray Borduin | 1033 views | 5 replies |

sandy170299

Date fields not updating properly.

No matter what I enter in my date fields, using the date picker, it always shows as 1-01-1970 on screen, in the update page. In the database itself, it shows up as 0000-00-00. I am going to include FTP info in a private message, but please don't edit anything that's already there as it will mess up the dates. Instead, please create new records to test with. If you do a search for sandy1 in the title field, you can work with this one as well. Thank you.

Sign in to reply to this post

Ray BorduinWebAssist

The issue is with the insert and update page, not the page it is displayed on.

You need to convert the data to use the format: YYYY-MM-DD in order for mySQL to recognize it properly.

The way to do that is to reformat the date with the date() function on the insert and update page like:

php:
<?php echo(date('Y-m-d',$_POST['dateField']));  ?>
Sign in to reply to this post
Did this help? Tips are appreciated...

sandy170299

In the update behavior, in the Bindings panel, which formatting option should I choose? This is what is currently entered, but it's not working.

<?php echo date('Y-m-d',((isset($_POST["datepicker_"]))?$_POST["datepicker_"]:"")); ?>

Sign in to reply to this post

sandy170299

Okay - I think I finally have it working.

<?php echo date('Y-m-d',strtotime(((isset($_POST["datepicker_"]))?$_POST["datepicker_"]:""))); ?>

Why won't the program do this automatically?

Thanks.

Sign in to reply to this post

Ray BorduinWebAssist

The MySQLi version does this automatically for date fields. We will be integrating it into Data Bridge in the next major update.

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

sandy170299

OK - thank you.

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