|
-
Feb 2nd, 2005, 11:38 AM
#1
Thread Starter
Member
Enforcing a double value in SQL
I'm writing a VB app which sends an SQL statement to 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 value into a DOUBLE value, so I can compare it with the LastEventTimestampRead variable? I tried CDbl but that' a VB command and not SQL.
Thanks.
-
Feb 2nd, 2005, 12:56 PM
#2
Re: Enforcing a double value in SQL
SQL SQL? Or Access SQL??
SQL - use the CONVERT function
If Access SQL, then CDbl oddly enough should work.
Tg
-
Feb 2nd, 2005, 01:30 PM
#3
Thread Starter
Member
Re: Enforcing a double value in SQL
I'm using MS Sequel Server.
Can you please tell me the syntax of the "Convert" function?
Thanks.
-
Feb 2nd, 2005, 02:08 PM
#4
Re: Enforcing a double value in SQL
Here is some information that I think you will find useful.
http://www.databasejournal.com/featu...le.php/2197931
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|