I think this is the function to convert FROM Epoch to a readable date/time 
format.  I need the other way around...

Thanks!


Lisa



________________________________
From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Cesaro, Tony M[EQ]
Sent: Tuesday, August 18, 2009 1:01 PM
To: [email protected]
Subject: Re: Date Time Conversion Issue in Remedy

**
Lisa,

We ended up writing an Oracle function to generate the conversion for us.  I 
have included the SQL source below.  You'll obviously want to change your time 
zone and input date format accordingly.

create or replace FUNCTION GETDATE (a_number number)
 RETURN Date IS
   date_x date;

BEGIN
  if a_number is null then
     return null;
  else
     date_x := new_time(TO_DATE('01/01/1970 00:00:00', 'MM/DD/YYYYHH24:MI:SS') 
+ (a_number/86400),'GMT','EDT');
  end if;
RETURN(date_x);
END GetDate;

Regards,

Tony Cesaro

From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Kemes, Lisa
Sent: Tuesday, August 18, 2009 12:52
To: [email protected]
Subject: Re: Date Time Conversion Issue in Remedy

**
I'm having a similar issues (details are a little bit different), but how do 
you convert a MM/DD/YYYY HH:MM:SS to epoch time.  We are using Windows 2003, 
Oracle 10, ARS 7.0.1....

I've seen lots of info about converting Epoch to a readable date format, but 
not the other way around....


Lisa


________________________________
From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of Robert Halstead
Sent: Tuesday, August 04, 2009 4:24 PM
To: [email protected]
Subject: Re: Date Time Conversion Issue in Remedy
** In the database, Remedy stores all date's in integer format (epoch unix 
time).  Perhaps this is your issue?  If you are putting these records directly 
into the database without going through remedy then you need to use epoch time. 
 If you are going through remedy, then I believe its the locale of the server 
but not sure.  (MM/DD/YYYY HH:MM:SS)

Hopefully this helps?
On Tue, Aug 4, 2009 at 11:31 AM, AMEY BHOSALE 
<[email protected]<mailto:[email protected]>> wrote:
** Hi All,

I have an issue in conversion of Date Time Format which is retrieved by calling 
a stored Procedure from other Database into Remedy

So the workflow is there an Filter which has Set Field Action consisting of 
Webservice where the input and Output Parameters are mapped.So this webservice 
runs on the XMLGATEWAY calling the stored procedure.

There is a form in Remedy which will store the details retrieved from stored 
procedure.The fields in the form are mapped in Xmlgateway Template (Create) and 
Template (Query).

The Template(Create) will create the record in the Remedy Form with the Output 
recieved from the Template(Query) which contains the stored procedure details.

So there are there date time fields which are returned by stored procedure 
having the formats as below : -

Two Date Time fields have format as :- MM/dd/yyyy hh:mm:ss for e.g 4/17/2008 
12:00:00
One Date Time field has format as :-    yyyy/MM/dd hh:mm:ss for e.g 2008/ 4/17 
12:00:00

So in the Create Template of Xmlgateway i specified the above formats but when 
the record is created in Remedy the other values are captured but the date time 
format fields the value is blank.

When i checked Catalina.out log file found that it is not able to convert this 
date format into Remedy.

So can anyone let me know what format of date time needs to be specified in 
Create Template of Xmlgateway ?


Regards,

Amey Bhosale



_Platinum Sponsor: [email protected]<mailto:[email protected]> 
ARSlist: "Where the Answers Are"_



--
"A fool acts, regardless; knowing well that he is wrong. The ignoramus acts on 
only what he knows, but all that he knows.
The ignoramus may be saved, but the fool knows that he is doomed."

Bob Halstead
_Platinum Sponsor: [email protected] ARSlist: "Where the Answers Are"_
_Platinum Sponsor: [email protected] ARSlist: "Where the Answers Are"_
_Platinum Sponsor: [email protected] ARSlist: "Where the Answers Are"_

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:[email protected] ARSlist: "Where the Answers Are"

Reply via email to