473,473 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Datetime in Where clause.

8 New Member
Hi i know this has been asked alot but i couldnt find anything that worked.

My query looks like this :
My dates in the SQL CE = "2007-05-11 15:25:40"


"Select * from table where Workdate='" & dtework & "'"


Ive tried to use "Like dtework "%" ""

Now i cant seem to just select on a date "2007/05/11" , Ive been using convert and other things found on the internet.But they all dont seem to select it.

Do mind im using SQLCE instead of a normal SQL server
May 11 '07 #1
1 7681
IamMacro
8 New Member
I tried this and i can get the Date now . but i want the other dates to be the way they are...

selectcommand.CommandText = "SELECT convert(nvarchar(10),datum,101),convert(nvarchar(1 0),beginuur,100),convert(nvarchar(10),einduur,100) from geenwerkdag where datum='" & dtewerk & "'"
May 11 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: KathyB | last post by:
I'm trying to concatenate fields in SQL stored proc for use in text field in asp.net dropdownlist. I'm running into a problem when I try to use a DateTime field, but can't find the answer (so far)...
4
by: Malcolm Diaz | last post by:
Hello all Thank you all in advance. I am completely at a loss here with this error. I am developing a simple interface that will allow a user to enter,execute and view results from a SQL statement...
1
by: Amir | last post by:
Hi all, I have a table called PTRANS with few columns (see create script below). I have created a view on top that this table VwTransaction (See below) I can now run this query without a...
1
by: colinhumber | last post by:
I have a datetime variable coming from my ASP.NET application that has a time portion. I give my users the option to perform an equals, greater than, less than, or between comparison. The trouble...
1
by: virendra.chandra | last post by:
hi guys, this is virendra. I am in big trouble to handle date situation using where clause. i am using ormapper. if the sqlserver and application server has different date format(different...
0
by: RSH | last post by:
I am having a bit of trouble filling a datatable with a query. I'm getting the error message: System.FormatException: String was not recognized as a valid DateTime. at...
2
by: Tina | last post by:
I'm selecting some columns using a .net dataadapter using Select myDate from myTable. then I... DIM dt as new datatable myda.fill(dt) Now in dubugging I am examining the dt.rows(0).ItemArray...
8
by: =?Utf-8?B?Um95?= | last post by:
I need to compare a datetime value against the value in a datetime column in the WHERE clause as accurate as ticks (100 ns). When I construct a query by string.Format("WHERE MyDatetimeColumn =...
4
by: =?Utf-8?B?Um95?= | last post by:
I have a DataRow dr retrieved from a database. One of the column is datetime type. How do I convert it to DateTime structure in .NET? DateTime dt = DateTime.Parse(dr.ToString()) will drop the...
2
by: =?Utf-8?B?Um95?= | last post by:
I want to dynamically construct a TSQL with a datetime column in the WHERE clause. How do I include the millisecond in the query? "WHERE datetimecolumn = " + dt.ToString() will not include the...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.