|
 |
access thread: Date Functions
Message #1 by "Tim Maher" <tim.maher@s...> on Thu, 26 Sep 2002 15:27:21 +0100
|
|
Hi,
I need to run a query once a month where the start date must be 1st
March (dd/mm/yy) of the current year. Does anyone know of a way to
increment the year in relation to the system year????
ie this year the date to show 01/03/02
next year the date to show 01/03/03
etc
Hope this makes sense!!
Thanks
Tim
This e-mail transmission is strictly confidential and intended solely
for the person or organisation to who it is addressed. It may contain
privileged and confidential information and if you are not the
intended recipient, you must not copy, distribute or take any action
in reliance on it.
If you have received this email in error, please notify us as soon as
possible and delete it.
This e-mail has been scanned using Anti-Virus software, however,
Swansea NHS Trust accept no responsibility for infection caused by
any virus received on the recipients system.
Message #2 by "John Ruff" <papparuff@c...> on Thu, 26 Sep 2002 11:35:56 -0700
|
|
Use the DateSerial function like this:
format(dateserial(year(date()),03,01),"mm/dd/yy")
John V. Ruff - The Eternal Optimist :-)
Always Looking For Contract Opportunities
www.noclassroom.com
Live software training
Right over the Internet
Home: xxx.xxx.xxxx
Cell: xxx.xxx.xxxx
9306 Farwest Dr SW
Lakewood, WA 98498
"Commit to the Lord whatever you do,
and your plans will succeed." Proverbs 16:3
-----Original Message-----
From: Tim Maher [mailto:tim.maher@s...]
Sent: Thursday, September 26, 2002 7:27 AM
To: Access
Subject: [access] Date Functions
Hi,
I need to run a query once a month where the start date must be 1st
March (dd/mm/yy) of the current year. Does anyone know of a way to
increment the year in relation to the system year????
ie this year the date to show 01/03/02
next year the date to show 01/03/03
etc
Hope this makes sense!!
Thanks
Tim
This e-mail transmission is strictly confidential and intended solely
for the person or organisation to who it is addressed. It may contain
privileged and confidential information and if you are not the
intended recipient, you must not copy, distribute or take any action
in reliance on it.
If you have received this email in error, please notify us as soon as
possible and delete it.
This e-mail has been scanned using Anti-Virus software, however,
Swansea NHS Trust accept no responsibility for infection caused by
any virus received on the recipients system.
Message #3 by "Bob Bedell" <bobbedell15@m...> on Thu, 26 Sep 2002 18:50:44 +0000
|
|
Something like:
MarchFirstNextYear = Format(DateSerial(Year(D) + 1, _
Month(D), 1), "dd/mm/yy")
>From: "Tim Maher" <tim.maher@s...>
>Reply-To: "Access" <access@p...>
>To: "Access" <access@p...>
>Subject: [access] Date Functions
>Date: Thu, 26 Sep 2002 15:27:21 +0100
>
>Hi,
>
>I need to run a query once a month where the start date must be 1st
>March (dd/mm/yy) of the current year. Does anyone know of a way to
>increment the year in relation to the system year????
>
>ie this year the date to show 01/03/02
>next year the date to show 01/03/03
>
>etc
>
>Hope this makes sense!!
>
>Thanks
>
>Tim
>This e-mail transmission is strictly confidential and intended solely
>for the person or organisation to who it is addressed. It may contain
>privileged and confidential information and if you are not the
>intended recipient, you must not copy, distribute or take any action
>in reliance on it.
>If you have received this email in error, please notify us as soon as
>possible and delete it.
>This e-mail has been scanned using Anti-Virus software, however,
>Swansea NHS Trust accept no responsibility for infection caused by
>any virus received on the recipients system.
>
>
>
>
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
|
|
 |