Sure, Norm.

 

To convert the Epoch seconds to Date/Time, create a Date/Time field, and
just push the epoch seconds. Remedy does the calculations.


To do the reverse, create an integer field, and push the value from a
Date/Time field, and remedy will convert that. I think I even sent you a
def of a form that does just that back at the end of last year. I might
have sent it to someone else though. I have it still if you want.

 

Thanks,


Gary

 

________________________________

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Kaiser Norm E CIV USAF 96
CS/SCCE
Sent: Monday, June 04, 2007 1:45 PM
To: arslist@ARSLIST.ORG
Subject: Easy Unix Time Conversion

 

Hi everyone:

 

Does anyone know of a simple method to convert a date/time to its
corresponding Unix time via the client? I want to set a field using
direct SQL.  I have a date/time field on a form, and I want to set
another field with the number of requests that were submitted after a
date selected by the user in the date/time field.  The problem is, the
Create Date is a long integer field in the database, not date/time.  So
passing the contents of the date/time field to the SQL query is invalid.

 

So to summarize, I have a form with a date/time field, a character
field, and a button.  I want the user to choose a date and time in the
date/time field.  He then clicks the button.  The system is then to
populate the character field with the number of requests that have been
opened on or after the date the user specified in the date/time.  The
issue, however, is that the date/time must be converted to Unix time
before it is passed to the direct SQL in order to work.

 

Any ideas? I've thought about pushing the date and time to the database
as a junk value on a junk form and then directly retrieving the result
via direct SQL, but that method is awfully weighty for something that
should be rather simple.  I would think there is some function that can
do this on-the-fly.

 

Norm

__20060125_______________________This posting was submitted with HTML in
it___

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

Reply via email to