UK Tax Week

G

Guest

The UK tax week number 1 starts on the 6th April of every year and finishes
on the 5 April of every year.

What date function do i need to be able to convert a given date into the
current tax week. Also i need to account for week 53.

Any help would be very much appreciated. thanks!
 
J

John Vinson

What date function do i need to be able to convert a given date into the
current tax week. Also i need to account for week 53.

DateDiff("ww", DateSerial(Year(Date() - IIF(Format(Date(), "mmdd") >
"0405", 0, 1), 4, 5), Date())

John W. Vinson[MVP]
 
G

Guest

thanks for info. i have had to add a few brackets to get it working

datediff("ww",(dateserial((year(Date() - IIF(Format(Date(), "mmdd") >
"0405", 0, 1))),4,5)), Date())

this works fine for the current date, what part do i change if i want to
change the current date. so if i wanted to find out the week number for the
04th june 2006, where would i put this date?
 
J

John Vinson

this works fine for the current date, what part do i change if i want to
change the current date. so if i wanted to find out the week number for the
04th june 2006, where would i put this date?

In place of Date() (all instances).

Or, if you have a date in a Form control, use that control's name in
place of Date(); put the name of the control in [square brackets].

John W. Vinson[MVP]
 
J

Jamie Collins

StuJol said:
What date function do i need to be able to convert a given date into the
current tax week. Also i need to account for week 53.

Consider creating a calendar table with columns for current tax week,
current tax month, current tax year start, current tax year end, etc.
For more hints, see:

http://www.aspfaq.com/show.asp?id=2519

Jamie.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top