473,382 Members | 1,107 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

date variable problems

Hi All,

when using the following select statement

Dim d1 As date = datetime.now

Dim CommandText1 As String = "select count(callid) as [Number of new
Calls] from calls where datetimecalllogged >="
CommandText1 = CommandText1 + d1

the record set seems to be filtered on the time only, 00:00:00,
returning all reocrds. Has anyone seen this before?

Jonny
Nov 18 '05 #1
1 1397
I would suggest to change the code to the following if you are using SQL Server
Dim d1 As date = datetime.no

Dim CommandText1 As String = "select count(callid) as [Number of ne
Calls] from calls where datetimecalllogged >="
CommandText1 &= "'" & d1 & "'

Bin Song, MC

----- Jonny wrote: ----

Hi All

when using the following select statemen

Dim d1 As date = datetime.no

Dim CommandText1 As String = "select count(callid) as [Number of ne
Calls] from calls where datetimecalllogged >=
CommandText1 = CommandText1 + d

the record set seems to be filtered on the time only, 00:00:00
returning all reocrds. Has anyone seen this before

Jonn

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Lloyd Sheen | last post by:
Below is the output from command window. This shows values of variables and result of comparison. Make no sense except to dot.net. Any ideas?? ?pofile #11/11/2003 12:39:22 PM# ?pdtdbdate
18
by: Robin Lawrie | last post by:
Hi again, another problem! I've moved from an Access database to SQL server and am now having trouble inserting dates and times into seperate fields. I'm using ASP and the code below to get the...
13
by: Deano | last post by:
Hi, I generate a report using two dates (From and To). I notice if I enter 01/10/2003 that it is interpreted by Access as 10/01/2003 i.e 10th January rather than 1st October as I intended. ...
14
by: Alan | last post by:
Hi everyone! I'm trying to produce a periodic financial report on projects from various departments. My database is set up with the tables tblDepartment, tblProjects, tblPeriods, and tblBudgets...
0
by: Brian Conway | last post by:
I am having some validation and insertion problems. I am using a date picker that takes the selected date and puts it to ("dd-MMM-yyyy") format, as this was the only format that Oracle would...
7
by: Jerome | last post by:
Hallo, I know a lot has already been told about date/time fields in a database but still confuses me, specif when dealing with SQLserver(Express). It seems that sqlserver only accepts the date in...
1
by: zerbie45 | last post by:
I have a high number of computers that at logon write some information to a sql 2005 database. Information such as computer name, user name, logon date and logon time are entered. Because...
2
by: Brad Pears | last post by:
I am working on a vb.net 2005 project using sql server 2000 as the backend . I am having a bit of problems with date variables... Here is the scenario... I have a table that includes a couple...
4
by: thomasc1020 | last post by:
This is regarding VB.NET 2003. Variable 'Date' is a string and it contains date information in this format: "DEC/05/2007". Now I am trying to convert the format as "2007-12-05". Is it...
3
by: murch.alexander | last post by:
I made a simple public function to set and return a date value (see below). I have a number of queries that call up the function to get the "As Of Date," which is typically set to today's date....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.