to_date function not in DB?? |
[eluser]KrizzAngel[/eluser]
hi i got this query block on my page. Quote: <? $date = $inf->Birth; and i got this error when im running it XD Quote:<h1>A Database Error Occurred</h1>
[eluser]n0xie[/eluser]
This isn't really related to CodeIgniter. This is related to which DB you are using. Of course, it would be easier to debug, if you would tell us WHICH RDMS you are using. If you are using MySQL, then no, to_date does not exist.
[eluser]KrizzAngel[/eluser]
yeah mysql QQ nvrmind.. already made an alternative to split the date.. explode function lols
[eluser]jbreitweiser[/eluser]
For the record you should use month. For the leading 0 use LPAD. Code: MONTH(date) SELECT LPAD(MONTH('1998-02-03'), 2,'0') -> 02
[eluser]n0xie[/eluser]
http://dev.mysql.com/doc/refman/5.1/en/d...tions.html |
Welcome Guest, Not a member yet? Register Sign In |