473,473 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Msaccess query to update only day part to 01 in date field

16 New Member
Hi, I have a date/time column in msaccess 2007 table and it has values in mm/dd/yyyy format. I want to keep the mm and yyyy values as it is and only update the dd value to 01. Is there an easy update query to get it done.
I am tring to run a query like this

Expand|Select|Wrap|Line Numbers
  1.  Update Table1 Set Day(ColumnName) = '01' 
However I am getting a syntax error on Update statement:


Current value example : 01/23/2012 and expected value 01/01/2012

Current value example: 05/03/2010 and expected value 05/01/2010.


Please let me know your thoughts.
Oct 4 '12 #1
1 1630
Rabbit
12,516 Recognized Expert Moderator MVP
You can use the date serial or date add function.
Oct 4 '12 #2

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

Similar topics

4
by: fwiest | last post by:
Could someone help me with the most efficient way to update a date field. I have a field with Date and Time in it but I want to update it with only the Date and strip off the time. Any ideas for...
3
by: BlackFireNova | last post by:
This concerns an Access 2002 (XP) database. There are two fields, "Notes" (Memo Field) and "Notes Update" on a form (among others) which I am concerned with here. Problem: I need to be able...
2
by: Danny | last post by:
I have a table with an 'orderdate' field. this is a date type. I am trying to return all records that have an orderdate of within 30 days from todays date. The datediff in a sql query did not...
2
by: terbolee | last post by:
I have two fields: & . An integer, such as 14 for and dd/mm/yyyy for . A third date field, also dd/mm/yyyy for needs to be filled in with plus the . I tried After update Event: Me.EndDate =...
1
by: jr1024 | last post by:
I am trying to update a Date field in mdb file, but I get "Update syntax error" at run-time This is my code: private void dataGrid_CellEndEdit(object sender, DataGridViewCellEventArgs e) {...
1
by: tomzji | last post by:
I am using Sql server 2005. I have one table named 'tblJob'. This table have two fields say 'Staus' and 'ExpiryDate'. when 'Expirydate' come to less than current date, i want to upadte 'Status'...
22
by: tonialbrown | last post by:
I have an Sql update statement that I am using that updates the data from a record chosen by the user from a list box lstDelFrom. This is working for all the text fields & updates fine. Once I add...
1
by: Trevor2007 | last post by:
Update query should update the date field in a table but does not, I try printing off with debug.print and no results DoCmd.RunSQL "UPDATE IndividualSettingsTbl SET IndividualSettingsTbl.Date =...
3
by: David Snyder | last post by:
I have a date that is used to show when someone completed a task and the task is due again in 12,24,48 months. I am trying to update a field for the next due date. Of course after I get this done, I...
2
by: hrprabhu | last post by:
I have a form with a date field and a transaction number field. The transaction number is of the format 99678*06*10*01234. The first five digits (99678) are source code. The next two digits (06)...
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
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
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,...
1
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
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: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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 ...
1
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.