Hi,

Why do you want to do it through SQL instead of through the normal interfaces?

Timestamps are stored as an integer counting seconds since 1970.

To find differences in Advanced Search, you do: ('date1' != 'date2')

In SQL you do (date1 != date2) replacing the fields with the fields column
name, for example C536870913.

Both these searches (API and SQL) will miss the case where one value is NULL
and the other has a date set. This must be handled by explicitly checking for
nulls.

But you might also be talking about finding differences as a specific
difference in time. Examples:
('date1' < 'date2) which gives you a list of calles where date1 is earlier
than date2.
('date2' - 'date1' > 3600) gives you all records where date2 is at least one
hour greater than date1.
...

        Best Regards - Misi, RRR AB, http://www.rrr.se (ARSList MVP 2011)

Ask the Remedy Licensing Experts (Best R.O.I. Award at WWRUG10/11/12/13):
* RRR|License - Not enough Remedy licenses? Save money by optimizing.
* RRR|Log - Performance issues or elusive bugs? Analyze your Remedy logs.
Find these products, and many free tools and utilities, at http://rrr.se.

> Hi All,
>
>
>
> We are using SQL 2005 Database for Remedy Application, the Remedy version
> is 7.1.
>
>
>
> I need to run a query in Database to find difference between two date
> fields.
>
> We all know that in AR system DB the date & time will be store in Epoch
> time.
>
> I am not that much expert in SQL to write a query to find the difference.
>
>
> Can anyone help me out on this.
>
>
> Regards,
>
> Karthick S
>
> _______________________________________________________________________________
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
> "Where the Answers Are, and have been for 20 years"
>

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
"Where the Answers Are, and have been for 20 years"

Reply via email to