Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to set Date format in UTL_SMTP

Re: How to set Date format in UTL_SMTP

From: joel garry <joel-garry_at_home.com>
Date: 20 Mar 2007 13:47:25 -0700
Message-ID: <1174423645.140384.30770@e1g2000hsg.googlegroups.com>


On Mar 20, 4:25 am, "aru" <arumugam..._at_gmail.com> wrote:
> Hi,
> I have one strange problem with UTL_SMTP.
>
> I am using the following code to set the date value and format in
> header buffer:
>
> header:= 'Date: '||TO_CHAR(SYSDATE,'fmDy, DD Mon YYYY fxHH24:MI:SS')||
> crlf||
> 'From: '||sender||''||crlf||
> 'Subject: '||subject||crlf||
> 'To: '||recipient||crlf||
> 'CC: '||ccrecipient ;
>
> With this method, the mails sent from database carry SYSDATE of the
> machine where the Oracle Database is running. In my case, database is
> running in India.
>
> People in US complain that they get future-dated mail. Since the
> database is running in India and there is time difference of 12 hr
> 30mins between the regions, this is expected. But when I send mail
> using Java Mail API, I did not have this kind of issue. Anything can
> be done for this???
>
> Help from somebody is highly appreciated.
>
> Thanks,
> Ary

SQL> select to_char(sysdate,'fmDy,DD Mon YYYY fxHH24:MI:SS') from dual;

TO_CHAR(SYSDATE,'FMDY,DD



Tue,20 Mar 2007 13:49:24

SQL> select to_char(sysdate-.5,'fmDy,DD Mon YYYY fxHH24:MI:SS') from dual;

TO_CHAR(SYSDATE-.5,'FMDY



Tue,20 Mar 2007 1:49:49

jg

--
@home.com is bogus.
http://www.faqs.org/faqs/firesign-theatre/lexicon/part1/
Received on Tue Mar 20 2007 - 15:47:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US