Calculate Tax week no. based on Date in Text box?

IshBuild

New member
Local time
Today, 17:14
Joined
Sep 20, 2017
Messages
6
Good Morning All,

I'm currently building a form that I need to show today's date and the tax week number in a taxt box (Just in case it needs editing)

I'm aiming to have these automatically populate based on the information I've assigned in the date text box

E.g Date text box =(Today)

Is there an equation or code I can use to calculate the tax week number based on the date shown above (E.g IF date= 14.05.2017 then tax week would equal 7)

Thanks
 
you have to manually put them in the tax table,
unless you have computation on how to obtain them.
(if you have, you can give the formula and
we'll translate them).

using manual system:

1. create another two fields in tax table.
2. fields:
WeekNumber (Number/Integer)
StarOftWeek (Date/Time Format: ShortDate)

3. fill these fields, StartWeek Field is
the date where Weeknum starts.

4. (optional) add another field form EndOfWeek.

example:
to use it in Query, supposed you have another
table (tblAnother, i will call) and have date
field, you wanted to know which week on tax table
does it fall and give the taxable value:

select dateField,
(Select Top 1 WeekNum From taxTable Where StartOfWeek<=tblAnother.dateField Order By StartOfWeek desc) As WeekNum,
(Select Top 1 taxableAmount From taxTable Where StartOfWeek<=tblAnother.dateField Order By StartOfWeek desc) As Tax
From tblAnother
 
Last edited:

Users who are viewing this thread

Back
Top Bottom