473,320 Members | 2,097 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,320 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 1394
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.