Subject Re: [firebird-support] Re: Formatting Brazilian dates in triggers and stored procedures
Author Carlos H. Cantu
Just create an UDF to do that. You can even use Pascal to create it,
using Delphi's FormatDateTime to do the job.

You can find examples on how to create UDFs in several places in the
Internet, or in any of my books.

Carlos
Firebird Performance in Detail - http://videos.firebirddevelopersday.com
www.firebirdnews.org - www.FireBase.com.br

r1> My problem is not on data modelling, but on user receiving emails
r1> with long texts concerning company information. For instance,
r1> receiving a sentece like this "You product is available since
r1> 2004-11-08 14:45:55.0000. Please, call us back as soon as
r1> possible." Brazilian people expect to read date information in the format "dd/mm/yyyy".

r1> I use triggers and stored procedures to store this kind of
r1> long-text information on special external tables that are
r1> translated to XML and used from an external tool to send email and SMS to customers and suppliers.

r1> My problem now is that my triggers and SPs are getting too much
r1> long and difficult to understand because of the amount of date and
r1> time information that I have to transform in readable text.

r1> That's why I am questioning whether would be another easier
r1> solution to format date information in selects, maybe something
r1> simple such as Delphi's FormatDateTime function.

r1> Thanks,

r1> Roberto Carlos