ODBiC Discussion Board


$format() not working for dates in YYYY-MM-DD format

by David Richardson, May 8, 2005 10:46

Me again,

Sorry about not getting back on the other issues. I have been handed a *massive* project which i'm using ODBscript for. And I've got somore more questions coming in the next few days.

But in the meantime I'm trying to format dates on-the-fly.

Usually I would perform a date_format function with mySQL in the SQL query, but I won't know the fieldnames beforehand in this particular script. So I thought I would perform a SQL COLUMNS function and if the $type$=DATE, then I would do a $format(dmy,$var($fieldname$)) - to begin with anyway, I later want to be able to pull the full day name out as well as ordinals.

Anyway, EVERY time I do this, it complains that the date is in an invalid format. The standard way that mySQL stores dates is either YYYYMMDD or YYYY-MM-DD. Both of these throw up an "invalid date" error.

Is there any way this can be fixed? OR am I doing something wrong?


Replies:


Post Your Reply:

Name   
E-mail  optional
Topic  
Message:

HTTP Link: 
Link text: 

          


Copyright ©1997-2003, Roger Harris. All rights reserved.