api has the answer http://api.cakephp.org/1.2/class_controller.html#f6d9f131aca280eb1c21e3665b0de659
Sam D On 9/2/07, Luiz Fernando <[EMAIL PROTECTED]> wrote: > > 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 > > > > > -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---