Re: leading zeroes in day, month
Posted in 2003
Mitja Udovc wrote: > I'm using dbacess and i tried with substring but it doesn't work > like > > SELECT (DAY(test.date)+100)[2,3] SELECT SUBSTR(DAY(test.date) + 100, 2, 2) ... (IIRC, SUBSTR function takes a start position and a length, rather than start and end positions.) > "Jonathan Leffler" <jleffler@earthlink.net> wrote: >>Mitja Udovc wrote: >> >>> I would like to show day(date) and month(date) with leading >>> zeroes. Is it any way to do that >> >>Lots - but which language are you using? DB-Access, ESQL/C, I4GL, >>something else? What I18N/L10N issues do you have to deal with - >>which sequence of fields do you use in a date string? >> >>You can probably use a CASE expression to fix it up. Alternatively, >>you could substring a string representation of the date value. It would be helpful to know which version of the server you are using too - it helps people know whether SUBSTR(), for example, is going to work for you. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/