Tadeu,

      One of our SQL experts recently implemented this function for us:


CREATE OR REPLACE FUNCTION SYS.Epoch_Convert(secs IN NUMBER)
  RETURN DATE
IS
  lDate DATE;
BEGIN
  lDate :=
(From_TZ((TO_DATE('01/01/1970','MM/DD/YYYY')+(secs/86400)),'GMT') AT TIME
ZONE 'US/Eastern');
  RETURN lDate;
END Epoch_Convert;

      We use it in Oracle views that we manage for reports.  In those
views, it's called like this:

sys.epoch_convert(Create_Date),

      In this case, we passed 'Create Date' to the function.

HTH

Mike White
Office:  813-978-2192
E-mail:  [EMAIL PROTECTED]


                                                                       
                      Tadeu Augusto                                    
                      Dutra Pinto              To:       [email protected]
                      <[EMAIL PROTECTED]        cc:                     
                      .BR>                     Subject:  RES: Date SQL Function
                      Sent by: "Action                                 
                      Request System                                   
                      discussion                                       
                      list(ARSList)"                                   
                      <[EMAIL PROTECTED]                                
                      ORG>                                             
                                                                       
                                                                       
                      07/01/2008 12:15                                 
                      Please respond to                                
                      arslist                                          
                                                                       
                                                                       




oh, I'm so sorry.

I'm using:
ARS Server 7.0.01 Patch 7
ARS Clients (Admin and User) 7.0.00 Patch 1
Oracle Database 10g
OS Server AIX 5.3
OS Client Windows XP

Att,


Tadeu Augusto Dutra Pinto
-----------------------------------------------------------------
IT Web Services ATM
Cinq Technologies
http://www.cinq.com.br <
https://webmail.cinq.com.br/exchweb/bin/redir.asp?URL=http://www.cinq.com.br/
>
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Fone: 41 3018-2833 - Cinq
-----------------------------------------------------------------
Confiabilidade, Inovação e Qualidade em T.I.

________________________________

De: Action Request System discussion list(ARSList) em nome de Grooms,
Frederick W
Enviada: ter 1/7/2008 13:10
Para: [email protected]
Assunto: Re: Date SQL Function


**
What SQL database are you on (and version please)?

Fred

________________________________

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Tadeu Augusto Dutra Pinto
Sent: Tuesday, July 01, 2008 10:34 AM
To: [email protected]
Subject: Date SQL Function


Does anyone has a SQL Function that returns Date/Time from the integer that
AR System generate?

I need this format Date : DD/MM/YYYY 00:00:00


I have used this function but It's returning something wrong... the Date
comes correct... but the Time that I receive is 3 hours later than the
original Hour saved in my ARS Form:


nvl2(CreateDate, to_char(to_date('00:00:00', 'HH24:MI:SS')+
(CreateDate/(60*60*24)), 'HH24:MI:SS'), '00000000') CreateDate


Some  tips will be very appreciated!


Thanks


Tadeu Augusto Dutra Pinto
-----------------------------------------------------------------
IT Web Services ATM
Cinq Technologies
http://www.cinq.com.br <
https://webmail.cinq.com.br/exchweb/bin/redir.asp?URL=http://www.cinq.com.br/
>
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Fone: 41 3018-2833 - Cinq
-----------------------------------------------------------------
Confiabilidade, Inovação e Qualidade em T.I.
__Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"
html___

_______________________________________________________________________________

UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"


_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

<<inline: pic05503.gif>>

Reply via email to