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

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

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

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

Thanks,

Roberto Carlos




--- In firebird-support@yahoogroups.com, Dimitry Sibiryakov <sd@...> wrote:
>
> > Is there a better solution than
>
> Yes. Don't keep dates as strings. Keep them as dates.
>
> SY, SD.
>