Jul 09
Rev. Steve Willis Converting FM Dates to MySQL
Jul 09, 2010; 19:41
Rev. Steve Willis
Converting FM Dates to MySQL
Hi, all!
Got an FM Enrollments table that I'm copying to a MySQL clone of the same. External data source and ODBC driver work great.
Am using a script to copy the contents of the FM record into variables, then creating a new MySQL record and performing Set Field commands with the variables to populate the fields.
Unfortunately, the dates are not making the jump. For example:
On the FM side is a field called EnrollmentDate (type Date).
On the MySQL side is a field called Enrollment_Date (type DATE).
Got a custom function that is SUPPOSED to convert an FM date to a MySQL date. It is as follows:
/* Returns a MySQL Date from a FileMaker Date */
Year( GetAsDate( FM_Date )) & "-" &
If( Month( GetAsDate( FM_Date ) ) < 10;
"0" & Month( GetAsDate ( FM_Date ));
Month( GetAsDate ( FM_Date ))
) & "-" &
If( Day( GetAsDate( FM_Date ) ) < 10;
"0" & Day( GetAsDate( FM_Date ));
Day( GetAsDate( FM_Date ))
) & "00:00:00"
I've tried this function also without the 00:00:00 portion at the end and it still doesn't work.
The calc field that invokes this function outputs TEXT.
Any ideas about what the heck I'm doing wrong here?
Thanks!
Steve
--
Rev. Steve Willis
Director of Software Development
Life Christian University
P.O. Box 272360
Tampa, Fl 33688
(520) 891-3721
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/FileMaker/Browse/
Manage your subscription: http://www.ListSearch.com/FileMaker/
Jul 10
Cornelius Walker Re: Converting FM Dates to MySQL
Jul 10, 2010; 08:03
Cornelius Walker
Re: Converting FM Dates to MySQL
Jul 10
dealtek Re: Converting FM Dates to MySQL
Jul 10, 2010; 09:11
dealtek
Re: Converting FM Dates to MySQL
Jul 10
Rev. Steve Willis Re: Converting FM Dates to MySQL
Jul 10, 2010; 15:27
Rev. Steve Willis
Re: Converting FM Dates to MySQL
Jul 10
Rev. Steve Willis Re: Converting FM Dates to MySQL
Jul 10, 2010; 16:12
Rev. Steve Willis
Re: Converting FM Dates to MySQL