Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am using this code:

 

Dim sSQL As String = "Select Contact1.Contact, " & _
 "Contact1.RecID FROM Contact1, Cal WHERE " & _
 "AlarmDate=" & Today & " AND convert" & _
 "(varchar(8),AlarmTime,113)>=convert(varchar,'" & _
 Format(Now, "HH:mm") & "',113) AND AlarmFlag='Y'"

 

To compare a string field with a time value in it to a time value, in order to return the rows where a date and time has passed now and an alarm flag is set

 

I know I am misusing the VarChar but I don't see how - any help with a correct line here?

 

Thanks

Read the Fovean Chronicles

Because you just can't spend your whole day programming!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...