Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Dates and Fiscal week


Message #1 by "Christopher Oberheim" <choberheim@l...> on Mon, 9 Jul 2001 12:59:46
Creating a form that has to show and track the fiscal week.  Also our 

corporate fiscal calendar starts in October so I would have to take that 

into account also.  Is there a function that will give you that or do I 

need to make some kind of table?



Thanks

Chris



Message #2 by "Darron Michael" <darron.michael@h...> on Mon, 9 Jul 2001 14:20:53
You will need to create a function to do that based on YOUR fiscal 

calendar.  Then you can call that function when you need it.  You may also 

want to create a table with your holidays / shutdown days and create a 

function to use that table when you need "Work days" rather than "calendar 

days".



I have a function that will take a date in one field (orderdate) and will 

bounce against our holidays table to give me a date in a 2nd field 

(needby) that is so many "Working Days" later or earlier than the 

orderdate.  It is not very quick as it has to loop the number of days that 

you want to span, and in each loop it has to check to see if that day is a 

holiday in the holidays table or if it is a weekend.



What specifically are you wanting to do on your form?  Group transactions 

by week? or by quarter?



Hope this helps.



8^)

Darron
Message #3 by "Carlos Del Rio" <cdelrio@c...> on Mon, 9 Jul 2001 11:15:11 -0400
Now that we're on dates...



I have an CSV table with dates in the yyyymmdd format (20010709 for today).

Why can't I import it to a structured table with the yyyymmdd format? I keep

getting errors, or it won't import it at all.



The field I want to import it to has yyyymmdd in the format field.

TIA

Carlos



-----Original Message-----

From: Darron Michael [mailto:darron.michael@h...]

Sent: Monday, July 09, 2001 2:21 PM

To: Access

Subject: [access] Re: Dates and Fiscal week





You will need to create a function to do that based on YOUR fiscal

calendar.  Then you can call that function when you need it.  You may also

want to create a table with your holidays / shutdown days and create a

function to use that table when you need "Work days" rather than "calendar

days".



I have a function that will take a date in one field (orderdate) and will

bounce against our holidays table to give me a date in a 2nd field

(needby) that is so many "Working Days" later or earlier than the

orderdate.  It is not very quick as it has to loop the number of days that

you want to span, and in each loop it has to check to see if that day is a

holiday in the holidays table or if it is a weekend.



What specifically are you wanting to do on your form?  Group transactions

by week? or by quarter?



Hope this helps.



8^)

Darron







Message #4 by "Christopher Oberheim" <choberheim@l...> on Mon, 9 Jul 2001 19:10:03
Any way to use the DatePart function along with Date()to refer to say the 

sunday date of every week?  So no mater what day of the week it is it will 

kick back to the Sunday.









> You will need to create a function to do that based on YOUR fiscal 

> calendar.  Then you can call that function when you need it.  You may 

also 

> want to create a table with your holidays / shutdown days and create a 

> function to use that table when you need "Work days" rather 

than "calendar 

> days".

> 

> I have a function that will take a date in one field (orderdate) and 

will 

> bounce against our holidays table to give me a date in a 2nd field 

> (needby) that is so many "Working Days" later or earlier than the 

> orderdate.  It is not very quick as it has to loop the number of days 

that 

> you want to span, and in each loop it has to check to see if that day is 

a 

> holiday in the holidays table or if it is a weekend.

> 

> What specifically are you wanting to do on your form?  Group 

transactions 

> by week? or by quarter?

> 

> Hope this helps.

> 

> 8^)

> Darron
Message #5 by "Darron Michael" <Darron.michael@h...> on Tue, 10 Jul 2001 14:29:21
You can use the Choose function along with the weekday function to kick it 

back to sunday.  Use the weekday function to determine what day of the 

week it is.



Example:



Date2 = Choose(weekday(date1),date1, date1 - 1, date1 - 2, date1 - 3, . . .



> Any way to use the DatePart function along with Date()to refer to say 

the 

> sunday date of every week?  So no mater what day of the week it is it 

will 

> kick back to the Sunday.

Message #6 by "Darron Michael" <darron.michael@h...> on Tue, 10 Jul 2001 14:32:28
I think it is not recognizing your data as a date.  I'd import the CSV 

table into a temp table as text and then do a query to convert the 

YYYYMMDD into a date during the append to the table.



> Now that we're on dates...

> 

> I have an CSV table with dates in the yyyymmdd format (20010709 for 

today).

> Why can't I import it to a structured table with the yyyymmdd format? I 

keep

> getting errors, or it won't import it at all.

> 

> The field I want to import it to has yyyymmdd in the format field.

> TIA

> Carlos

> 


  Return to Index