473,395 Members | 1,941 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,395 software developers and data experts.

School Year Months as 1 to 10

TblSchoolYear
SchoolYearID
SchoolYear
SchoolYearStartDate
SchoolYearEnddate

A typical record looks like:
1
2004 - 2005
9/4/04
6/12/05

I need an expression that identifies the months from September 04 to June 05
as 1 to 10.

Thanks for the help!

Julie
Nov 13 '05 #1
5 1032

"Julie" <Ju***@notmysite.com> wrote in message
news:zF******************@newsread2.news.atl.earth link.net...
TblSchoolYear
SchoolYearID
SchoolYear
SchoolYearStartDate
SchoolYearEnddate

A typical record looks like:
1
2004 - 2005
9/4/04
6/12/05

I need an expression that identifies the months from September 04 to June 05 as 1 to 10.
This assumes that d is a date in the valid range.
Dim d As Date
d = #5/30/2005#
Debug.Print DateDiff("m", #8/1/2004#, d)

HTH,
Randy
Thanks for the help!

Julie

Nov 13 '05 #2
Julie wrote:
TblSchoolYear
SchoolYearID
SchoolYear
SchoolYearStartDate
SchoolYearEnddate

A typical record looks like:
1
2004 - 2005
9/4/04
6/12/05

I need an expression that identifies the months from September 04 to June 05
as 1 to 10.


I'm sure there's a mathmatical way but I can't think of one right now,
so here's a brute force way.

IIf(Month > 8, Month - 8, Month + 4)

--
This sig left intentionally blank
Nov 13 '05 #3
Trevor Best <no****@besty.org.uk> wrote in message news:<41***********************@news.zen.co.uk>...
I'm sure there's a mathmatical way but I can't think of one right now,
so here's a brute force way.

IIf(Month > 8, Month - 8, Month + 4)


Month(DateAdd("m", 4, dtTestDate))
or
(Month(dtTestDate) + 3) Mod 12 + 1

should also work. BTW, Trevor, does the botanical garden in Cambridge
still have the Fortune Palm there?

James A. Fortune

The word query derives from Latin "perquirere" which means "to
search for thoroughly." -- www.m-w.com (Merriam-Webster Online)
Nov 13 '05 #4
James Fortune wrote:
should also work. BTW, Trevor, does the botanical garden in Cambridge
still have the Fortune Palm there?


No idea, never been there. There's probably a Gypsy around there that
tells fortunes by reading your palm.

--
This sig left intentionally blank
Nov 13 '05 #5
Trevor Best <no****@besty.org.uk> wrote in message news:<41***********************@news.zen.co.uk>...
James Fortune wrote:
should also work. BTW, Trevor, does the botanical garden in Cambridge
still have the Fortune Palm there?


No idea, never been there. There's probably a Gypsy around there that
tells fortunes by reading your palm.


You're telling me. I guess that makes you a Gypsy. :-)

James A. Fortune
Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Greg Lindstrom | last post by:
Hello- I just picked up my daughters' report cards for the year (they did well, thank-you) and was approached by the school administrator about writing an Acess application to help track...
0
by: Sara Price | last post by:
This year's XML Summer School is approaching once again and so it is time to make sure you register your place now! The event will again be held at Wadham College, University of Oxford, from...
2
by: Mary | last post by:
I am trying to develop a query which will determine the average costs using a rolling average of the past 12 months of data. In other words, if I entered the Ship Month of January and the Ship...
19
by: Ricardo Perez Lopez | last post by:
Hello everyone: I'm a PostgreSQL newbie, working now with dates, times, timestamps and intervals. I have three questions about the above: FIRST: --------
3
by: shahram.shirazi | last post by:
Hi guys, I was wondering if someone could help me a bit here. Im trying to desing an electronic register system for a school. In terms of the table design, I obviously need a Student Details...
6
by: Sridhar | last post by:
Hi, I need to display a calendar that shows all the months of an year. In that, I need to show different colors for certain events. I know how to display a calendar for a certain month but I am...
5
by: Kasrav | last post by:
I have another problem hopeful am not bothering you guys too much if u can help that would be wonderful. I have this code here def year2(): print'This program validates days and months of the...
37
by: mazwolfe | last post by:
I'm new here, so excuse me if my style is incorrect. Can anyone come up with a better method for this calculation? Code: int is_leap(int year) { switch (year % 19) { case 0: case 3: case 6:...
10
by: JacD | last post by:
I have an access database (MS Access 2002,) which stores school pupils information and I have very limited knowledge on VBA. Hopefully someone can help solve this one for me. I have a form...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.