Post new topic Reply to topic  [ 4 posts ] 

Board index : TeleFlow Forums : TeleFlow Designer & Simulator

Author Message
 Post subject:
PostPosted: Fri Apr 22, 2005 9:09 am 
Offline

Joined: Fri Apr 22, 2005 8:57 am
Posts: 11
Hello, <br> <br>I have a SQL query that I am having trouble getting to work properly: <br> <br>SELECT testID <br>FROM tblTests <br>WHERE SubmissionDeadline >= @DATE <br>AND userID = @GETID <br> <br>SubmissionDeadlines that are less than the current date are still being queried. <br> <br>I understand that SQL dates are often not compatible with TeleFlow dates. In MS SQL, the date fields are stored as 4/4/2005. The @DATE variable is formatted as YYYY/MM/DD. Is there a way to make this query work? <br> <br>Thanks! <br>Trace


Back to top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 22, 2005 9:30 am 
Offline

Joined: Wed Mar 19, 2003 4:28 pm
Posts: 510
Location: Canada
You'll need to locate an MS SQL function that allows you to convert the TeleFlow date to a date format that MS SQL supports. <br> <br>From having dealt with some such issues, I can tell you that you might find it works if you try the following comparisons (test each, I'm not sure which, if any, will work in this case), as well: <br>SubmissionDeadline >= Now() <br>SubmissionDeadline >= '@DATE' <br>SubmissionDeadline >= @DATE @TIME <br>SubmissionDeadline >= '@DATE @TIME' <br> <br>Now(), in particular, is a function that is available in many databases, and all seem to do a good job of comparing/using it againt their own date/time data types. <br> <br>Failing all that, I would suggest consulting an MS SQL book for MS SQL specific syntax to use in date/time formatting.


Back to top
 Profile WWW 
 
 Post subject:
PostPosted: Fri Apr 22, 2005 10:05 am 
Offline

Joined: Fri Apr 22, 2005 8:57 am
Posts: 11
It worked. The getDate() MS SQL function worked. Didn't realize we could use the MS SQL functions themselves within the queries....yippee!! <br> <br>Thanks Chris!


Back to top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 22, 2005 10:40 am 
Offline

Joined: Tue Mar 18, 2003 5:52 pm
Posts: 54
Location: Canada
This MS SQL function will convert a date to: 'YYYY/MM/DD' format <br> <br>convert(char(10),a.birthdate,111)


Back to top
 Profile WWW 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Board index : TeleFlow Forums : TeleFlow Designer & Simulator


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Style by Midnight Phoenix & N.Design Studio
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.