Stuart McLachlan
stuart at lexacorp.com.pg
Tue Jul 13 09:54:44 CDT 2004
On 13 Jul 2004 at 16:38, paul.hartland at fsmail.net wrote:
> To all, Our financial year starts at 1st April and all Im trying to do
> is get the number of weeks between 1st April and any date a user types
> in. I have just played with datediff for around 30 minutes using
> something similar to intWeeks = Datediff(ww,01/04/04,Me.txtDate) I
> used 12/07/04 for the me.txtDate which is around 16 weeks but Im
> getting 28. Can someone tell me where I can find the answer or send
> me an example of how to do this please. Thanks in advance for any help.
Looks like an internationalisation issue.
Is 01/04/04 1 April or 4 January 04?
Try using an unambigous form like Datediff("ww","1 apr 04",me.txtdate)
--
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.