[AccessD] DateDiff or other function

paul.hartland at fsmail.net paul.hartland at fsmail.net
Tue Jul 13 10:14:01 CDT 2004


Thanks, works perfect like that.....





Message date : Jul 13 2004, 03:56 PM
>From : "Stuart McLachlan" 
To : "Access Developers discussion and problem solving" 
Copy to : 
Subject : Re: [AccessD] DateDiff or other function
On 13 Jul 2004 at 16:38, paul.hartland at fsmail.net wrote:

> To all, Our financial year starts at 1st April and all I’m 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 I’m
> 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.



-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 

Whatever you Wanadoo:
http://www.wanadoo.co.uk/time/

This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm


More information about the AccessD mailing list