RE: [PHP] formatting sporadic date formats from access
| From: | Joseph Blythe | Date: | Fri, 09 May 2003 05:49:21 +0000 |
| Subject: | RE: [PHP] formatting sporadic date formats from access | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146970@lists.php.net to get a copy of this message | ||
Oops yes sorry I cc'ed wrong list :)
I guess I believed this was an mysql/access problem and would be better
dicussed on another listserver, I also didnt realise it was a non-standard
free text date, I guess you could write a macro in access to re-format the
date so it may be inserted as mysql date. Access is hardly my area of
expertise as I only usually export data from it this is why I responded as I
had a simular problem with its date format.
Glad you sorted it out.
Regards,
Joseph
-----Original Message-----
From: daniel@electroteque.org [mailto:daniel@electroteque.org]
Sent: Friday, 9 May 2003 3:01 PM
To: joseph@optcom.net.au
Subject: RE: [PHP] formatting sporadic date formats from access
firstly did i not reply offlist , and how did i get on the pear list u just
cc'd back to ?
anyway becuase its a non standard freetext date format the export didnt
format it which is why i was asking i already selected that, anyway i
soughted out my problemo i was terminating the line with \n not \r :\
> This is hardly the list for access discussions but I will on this
> occasion finish the thread, you may contact me privately if you wish if
> you have any problems although as I was typing this the boss is on my
> back to finish a quote what's new though :)
>
> I will assume you have a copy of access 2000
>
> 1) open up the .mdb file and select the table you wish to export, on
> the "File menu choose export and choose text format (.csv)
> 2) The default options are fine on first page of the export wizard but
> you must go to the advanced options and adjust the date format options
> to mysql's default date format which is yyyy-mm-dd so:
>
> Date order = "YMD"
> Date delimiter = "-"
> 4 digit years = true
> Leading Zeros in dates = true
>
> I think that's about it finish the export and that should be okay to
> import into mySQL
>
> Hope this helps,
>
> Joseph
> -----Original Message-----
> From: daniel@electroteque.org [mailto:daniel@electroteque.org]
> Sent: Friday, 9 May 2003 12:10 PM
> To: joseph@optcom.net.au
> Subject: RE: [PHP] formatting sporadic date formats from access
>
>
> how can i do this ?
>
>> If you are importing via an export (csv for expample) from access I
>> found it easier to just format the exports date format to mysql's
>> format.
>>
>> Regards,
>>
>> Joseph
>>
>> -----Original Message-----
>> From: daniel@electroteque.org [mailto:daniel@electroteque.org]
>> Sent: Friday, 9 May 2003 11:32 AM
>> To: php-general@lists.php.net
>> Subject: [PHP] formatting sporadic date formats from access
>>
>>
>> hi guys i am trying to transform dodgy sporadic date formats from
>> access to a standard mysql form , here is an example of my headache
>>
>> Fri Jan 5 16:40 1996
>>
>> what can i do to format this properly notice the year is at the end do
>> strtotime wont work :\ sometimes the year is in the right place
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php