Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Changing to MYSQL format - new version of TCAL
jcagney
Junior Member

Posts: 2
Registered: 3/9/2010
Location: bend, or
Member Is Offline
posted on 3/9/2010 at 05:03 PM Reply With Quote
Changing to MYSQL format - new version of TCAL


I need to get the date POSTED to my server side so I can insert it directly into a MYSQL table. Now it comes back mm/dd/yyyy.
I searched the forum and found a 2003 posting by NIK which had a solution but for Calendar1.js.
I implemented the fix as best as I could determine, but I am still getting the date returned as mm/dd/yyyy. Can someone help?

Here is what I attempted:
Finding no Calendar1.js and no code in Calendar_us.js that exactly matched the solution, I did find the // date generating function with almost the same code:
(d_date.getMonth() < 9 ? '0' : '') + (d_date.getMonth() + 1) + "/"
+ (d_date.getDate() < 10 ? '0' : '') + d_date.getDate() + "/"
+ d_date.getFullYear()

So I replaced it with from the solution (with minor changes):
d_date.getFullYear() + "-" + (d_date.getMonth() < 9 ? '0' : '') + (d_date.getMonth() + 1) + "-" + (d_date.getDate() < 10 ? '0' : '') + d_date.getDate()

Any suggestions please? This is the ideal script for me if I can get it to do this? A php suggestion for translating the mm/dd/yyyy to yyyy-mm-dd for MYSQL would be a perfectly happy answer.
View User's Profile View All Posts By User U2U Member
jcagney
Junior Member

Posts: 2
Registered: 3/9/2010
Location: bend, or
Member Is Offline
posted on 3/9/2010 at 07:23 PM Reply With Quote
Somewhat solved


I do this to the date on the client side:
$pieces = explode(" ", $DateDate);
$new_date = date("Y-m-d",strtotime($pieces[2]." ".$pieces[1]." ".$pieces[0]));
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Tigra Calendar
Product Demonstrations Live Demos
Free Download Free Download
Product Documentation Documentation
Support Forum Support Forum
 
Tigra Calendar PRO
Product Demonstrations Live Demos
Popup Calendar
Onpage Calendar
Modal Calendar
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004