I don't think you can subtract from the timestamp like that can you? Have
you tried using a datediff to get the proper date?

On Fri, 27 Oct 2006 15:55:35 -0400, Leigh Gruber <[EMAIL PROTECTED]> wrote:

>Hi Everyone,
>
> 
>
>I met a number of you at the 2005 RUG and am sorry that I didn't get to
>this year's gathering.  My husband and friends DID have successful
>English Channel relay swim over and back so I missed the event for a
>good reason. Hope to see you next year!
>
> 
>
>Now my question.... I am writing new workflow and have a direct SQL
>statement in an escalation which will execute occasionally.
>Unfortunately I get an error due to the conversion of the $TIMESTAMP$
>value into a nicely formatted date/time stamp.  
>
> 
>
>How can I get the current time to come out in epoch time so it will
>"play" nicely with the create date and the calculated offset?
>
> 
>
>This is the direct SQL statement.
>
>SELECT count(*) FROM Issue 
>WHERE  Customer_Abbreviation = '$Customer_Abbreviation$' AND 
>Create_Date > ($TIMESTAMP$ - ($Threshold Days$ * 24 * 60 * 60))
>
>
>
>And this is what I see when the SQL log is turned on for the server.
>SELECT count(*) FROM Issue 
>WHERE  Customer_Abbreviation = 'zSENTEL' AND 
>Create_Date > (10/27/2006 3:33:51 PM - (28 * 24 * 60 * 60))
>
>
>
>----------------------------------------------------^
>
>(*** ERROR *** Line 1: Incorrect syntax near '3'. (SQL Server 170))
>
> 
>
>We're running SQL Server 2000 on Windows 2003 OS.
>
> 
>
>Many thanks,
>
>Leigh
>
>
>
>The information contained in this message may be privileged and/or
confidential. If you are not the intended recipient, or responsible for
delivering this message to the intended recipient, any review, forwarding,
dissemination, distribution or copying of this communication or any
attachment(s) is strictly prohibited. If you have received this message in
error, please so notify the sender immediately, and delete it and all
attachments from your computer and network.
>
>
>_______________________________________________________________________________
>UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where
the Answers Are"
>

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

Reply via email to