SQL Syntax


Author
Message
LeRoy Jackson, Jr.
LeRoy Jackson, Jr.
StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)StrataFrame Beginner (22 reputation)
Group: Forum Members
Posts: 14, Visits: 55
Ok I know that this is very simple but I can't figure it out.

I am using SQLExpress and I have a table called Library.  I have a BO call Library1.  I created a method called FillByDate.

The column on my table that I want to look at is media_date it is of DataType DateTime.

my SQL is: "Select * from library where Media_date = @ldDate"

 ldDate = cdate("10/15/2006")

I am also new to Sql Server so My Question is what date conversion function do I need to get my parameter and my Table.DateTime Field to work. 

PS, I don't know what the actual time would be...Just the Date

Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
If you are using the StrataFrame DateTime control, there is a property that is called StripTimeFromDate (or something similar to that Smile )...anyway, this will remove the time from the date and will always be consistent when searching or selecting.  It is basically midnight and would look something like this: 12/01/2006 00:00:00 .  If you have a time in teh date column, the yes, this would be a problem when searching.  In this case you would have to take the time into account.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
LeRoy Jackson, Jr. - 19 Years Ago
LeRoy Jackson, Jr. - 19 Years Ago
StrataFrame Team - 19 Years Ago
LeRoy Jackson, Jr. - 19 Years Ago
StrataFrame Team - 19 Years Ago
Larry Caylor - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Larry Caylor - 19 Years Ago
Flavelle Ballem - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Larry Caylor - 19 Years Ago
Larry Caylor - 19 Years Ago
Trent L. Taylor - 19 Years Ago
Larry Caylor - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search