Subject Re: [firebird-support] date in ccyymmdd format inside procedure
Author Milan Babuskov
Rick Roen wrote:
> Inside a procedure, I would like to take a date value and convert to a
> string like "CCYYMMDD", i.e. "20081101". I know I can pull the date
> apart with Extract and then pad the single digit month and day values,
> but is there a better way?

Better? Probably not. But there's easier way. There's an UDF in rFunc
library that allows you to convert dates to varchar using the format you
want. You would use something like: DateToStr(date1, '%Y%m%d')

http://rfunc.sourceforge.net

HTH

--
Milan Babuskov
http://www.flamerobin.org
http://www.guacosoft.com