Results 1 to 2 of 2

Thread: SQL problem: Converting timestamp field into double value

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2002
    Posts
    61

    SQL problem: Converting timestamp field into double value

    I'm writing a VB app which sends an SQL statement to MS SQL Server:

    strSQL = "select * from systemevents where timestamp >= " + CStr(LastEventTimestampRead) + " ORDER BY timestamp"

    strSQL = the SQL statement
    timestamp = field with date and time value, in date and time format.
    LastEventTimestampRead = double variable from external source, representing a time value.

    How do I convert the timestamp field value into a DOUBLE type value within the SQL statement, so I can compare it with the LastEventTimestampRead variable? I tried CDbl but that's an Access command that's not compatible with SQL Server.

    Thanks.
    Last edited by Dr.Rock; Feb 3rd, 2005 at 07:04 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width