473,503 Members | 10,178 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

add one hour to column in sql via vb6

6 New Member
I have a database in access that I am trying to pull in and add 1 hour to a specific column [datetime field]. here is what i have so far...

Data1.RecordSource = "Select * from [table] where[column]+ #01:00:00 AM#"
Data1.Refresh

error says "date + date not allowed"

any ideas...?

thanks
Mar 25 '10 #1
1 1728
vb5prgrmr
305 Recognized Expert Contributor
Okay, the DateAdd function will add/subtract date/time from current time...

As for concatinating strings, you use the ampersand symbol (&) and not the addition/plus symbol (+)...

Then for where conditions, you are to use the comparison operators... < > =



Good Luck
Mar 26 '10 #2

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

Similar topics

6
2309
by: Bjørn T Johansen | last post by:
I need to compute the difference of Time fields, in the format HHMM. Is it possible to do the math in the Select? Regards, BTJ --...
3
3943
by: Jim Adams | last post by:
My Access app stamps the date and time for each database entry. I'd like to generate a report of: - the number of entries per hour of day (0 - 23), and also - the number of entries per day of...
5
6575
by: Brooks Clayton | last post by:
I have an A97 db on Win2k machine. I have a make table query to update a small db wich we then FTP to our website for customer order status. What is the best way to automate the query to run...
2
2872
by: David | last post by:
Hi, I use DataView to filter my record. But when I use: ls_filter += " and DATEPART(hh, CA103)=" + i ; mydv.RowFilter = ls_filter; I got error. How should I filter by hour using...
3
1884
by: A | last post by:
Hello, I try to make a Windows Service that doing some action at each begin of hour. I cannot use the task schedule. I have try to use thread, timer ... But nothing is correct. Do you have...
2
2856
by: spoonerstreet | last post by:
I am trying to take standard MS Time: 2/22/2006 8:56:37 AM (stored in MS Decimal Format) and convert it to the half hour of the day it occurred in: 2/22/2006 8:56:37 AM would be in the 18th...
3
2162
by: Shawn Yates | last post by:
I have a database that I am using as a Time clock where employees can clock in and out. Is there a way to make it so that when they clock out a form would open displaying their work day hour by...
1
3194
by: Richard Carpenter | last post by:
I have a datagridview column formatted as a datetime, but I've been unable to find a way to display that datetime using a 24-hour clock for the time. What would be the best way to make that happen?
2
4748
by: phanicrn | last post by:
Hi Everyone I Have column in sql server databas as "HHMMSS" and data as and i am doing a substring to get values for hours and minutes. since my calculations based on hour interval and 30...
10
5003
ollyb303
by: ollyb303 | last post by:
Hello, Need some help with an Access 2000 query. My query is based on a table which is a log of calls to my company. I am using a date range entered by the user (Date Between And ) and...
0
7095
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
7294
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
7361
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7470
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...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3183
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
1523
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 ...
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.