Hi there guys,

I know what the subject may make it look like, but my question is not
related to standard PHP functions like date(), strftotime(), and the
like. What I'm looking for is a function (that would probably be
provided by Cake) that would abstract the date formatting used in the
underlying database.

Right now I'm using MySQL. In my application, I'm fetching the
birthdate of the user using separate <select>'s for each field (day,
month and year). Then, at the controller, I join these together by
concatenating the year, month and day by the "-" character, that
results in a MySQL compatible date format, and insert/update this into
the database. However, I see that this format may not be compatible
for other databases, and would require me to modify the concatenation
method if in the future I decide to migrate the application to another
database.

So, what I'm asking for is if there's a function that, given a series
of parameters respective to each date field, or a single parameter
(like a timestamp) would return me a string with a date formatted in a
way compatible with the underlying database. Is there such a thing on
Cake?

Thanks,

Luiz


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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