The PHP sscanf function perhaps? Its a bit tricky to use and comes
with warnings about its proper use but it may help out. Alternatively
you can change the way excel formats dates in .csv format, which may
be easier and set your application up to reject any dates not in the
proper format. I doubt you will find plug-and-play scripts, I think
you are going to need to do some work and testing on this yourself.

Cheers, Ianh


On Jun 8, 8:16 am, Nelson <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I am working on a page which let users to upload excel files
> (generated with excel 2k/2k3/XP) and then store the information into
> database.  The uploaded excel file was prefixed layout.  For example:
>
> |            |A          |B          |C          |
> ----------------------------------------------------
> |     1     | John     |31/5/07 |male     |
> ----------------------------------------------------
> |     2     | Sam     |5/5/07   |female   |
>
> I know that would be easier if I ask user to save the file in CVS
> format, but problem is the date file on column B.  The MySQL was uses
> YYYY-MM-DD format, but in my work-place, we are used to have DD/MM/
> YYYY form, so while they saved the file in CVS mode, the date form
> will import wrong.
>
> I have search through Cake's site but yet cant find any usable
> scripts...  Any idea how can I fix this problem?  or Any ready-made
> script I can apply to?
>
> TQ.
>
> Best Regards,
> Nelson Neoh


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to