Subject | Re: [firebird-support] Re: Formatting Brazilian dates in triggers and stored procedures |
---|---|
Author | Julio Cesar |
Post date | 2009-07-29T20:44:26Z |
Hey, isn't a good place to have a computed field? or am I so wrong on this?
julio cesar
julio cesar
----- Original Message -----
From: rc.199011
To: firebird-support@yahoogroups.com
Sent: Wednesday, July 29, 2009 8:41 PM
Subject: [firebird-support] Re: Formatting Brazilian dates in triggers and stored procedures
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.
>
[Non-text portions of this message have been removed]