Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 1st, 2004, 09:50 AM
ppenn
Guest
 
Posts: n/a
Default Month Function needed??

Hi, Everyone

I have an Access database linked tables to our main server (Dbase system), recently, we transfer data into the new system, the server date wrongly set one month behind, so all DATE field data is now one month wrong. I would like to update to the correct date, should be one month ahead.

Here some examples:

Wrong Date corrected Date (should be)

28/02/2004 28/03/2004
25/12/2003 25/01/2004
30/05/2003 30/06/2003

and so on...

I would like to find out is there any function to add one month(NOT 30days) to the field, can anyone help?

Thanks in advance

Peter


 
Old April 1st, 2004, 10:01 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

take a look at the DateAdd function, example
UPDATE yourtable
SET thedatefield = DateAdd("m", 1, thedatefield)
 
Old April 1st, 2004, 10:38 AM
ppenn
Guest
 
Posts: n/a
Default

Thank you very much, it works very nicely.

peter






Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Needed: StreamWriter Function OnceANewbie Visual Basic 2005 Basics 1 August 10th, 2009 05:50 AM
Converting month name to month number kalyanykk SQL Server 2005 7 August 19th, 2008 10:37 PM
query Current Month, Month+1, Month+2, Month+3 anterior Access 2 September 24th, 2006 08:25 PM
get current month cathiec SQL Language 2 February 23rd, 2006 09:58 AM
Days in a Month jmss66 Classic ASP Basics 3 April 11th, 2005 05:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.