Subject | Re: [firebird-support] Re: Formating date to yyyymmdd |
---|---|
Author | Mark Rotteveel |
Post date | 2009-06-12T15:21:14Z |
Michel Veerman wrote:
or earlier, current_date looks cleaner than cast('today' as date).
testdata or checking test results.
Mark
--
Mark Rotteveel
>> I think using LPAD (and current_date) is a lot easier and readable:In 2.1 it is a built-in function, not an UDF. But even if you are on 2.0
>>
>> select extract(year from current_date) || lpad(extract(month from
> current_date), 2, '0') ...
> True, but it's an UDF. Not that it should matter much, but some people
> are allergic to them :-).
or earlier, current_date looks cleaner than cast('today' as date).
> Sometimes it's simply easier and quicker to do it all in one SQL script.True, I myself am guilty of it as well sometimes when I am querying
> Especially when it's a do-it-once-and-then-throw-away-the-code program
> :-).
> But for a full blown program, I agree with you.
testdata or checking test results.
Mark
--
Mark Rotteveel