Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

breaking down a date field into two fields in different format

Status
Not open for further replies.
Jul 21, 2009
13
US
i am a fairly new access user and need to break down a date field set up like this: 06/27/02 INTO 2 fields: 'fiscal year' and 'fiscal month'

How do i query the data to read the '06' in the date field and return it into the fiscal month field as '09'? and how do make it read the '02' and return it in a fiscal year field as '02'?

i do not have fields for 'fiscal year' and 'fiscal month' in my current table.
 
Add new fields to your table.

In the forms that you are using to populate your tables, add these fields as text boxes and then set the Month's default value to Month(Date()) and set year to Year(Date()).

Now setup an update query for Month and year to populate old records that aren't new with the current month and year.
or you can go through manually and set them yourself if their aren't many records. If there is already some sort of a combined date/year identifier you can use that to populate the older record's month and year fields more accurately.

-Josh ------------------
-JPeters
Got a helpful tip for Access Users? Check out and contribute to 'How to Keep Your Databases from becoming Overwhelming!'
thread181-293590
jpeters@guidemail.com
------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top