[AccessD] weekdays and numbers

Mark A Matte markamatte at hotmail.com
Fri Aug 15 08:41:06 CDT 2008


I'm using Access XP...and I could not find 'weekday' in help...it gave me 4 items it could be in...but I could not find it in any of them.  Then I tried accessing help from a vba module...and there it was, easily accessible.

Thanks,

Mark A. Matte



> Date: Fri, 15 Aug 2008 11:50:29 +0200
> From: Gustav at cactus.dk
> To: accessd at databaseadvisors.com
> Subject: Re: [AccessD] weekdays and numbers
>
> Hi Pedro
>
> The "2" determines which day is read as the first day of the week. Look up the on-line help for full explanation.
> 2 stands for Monday which is used in most (if not all) of Europe.
>
> As Doris writes, Month is first choice to extract the month of a date. However, it returns an Integer and as you request a leading zero, you need a string, and Format would then be the choice:
>
> Format([YourDateField], "mm")
>
> /gustav
>
>>>> pedro at plex.nl 15-08-2008 11:10>>>
> Hello Gustav,
>
> i used Weekday in the expression (before i asked at accessd), without the ", 2" after my fielddate, but became no result. With the ", 2" i worked fine. Why?
>
> Can i also get the month in an extra field with one expression?
> The result then must be:
>
> Date Month
> 04-05-2008 05
> 04-05-2008 05
> 11-07-2008 07
>
>
> Thanks
>
> Pedro
>
>
>
>
>
>
> Hi Pedro
>
> You could filter on:
>
> Where Weekday([YourDateField], 2) In (1, 5)
>
> and count records.
>
> If you only wish to count distinct dates, you can create a Select Distinct query first and feed that to the query where you count.
>
> /gustav
>
>
>
>>>> pedro at plex.nl 14-08-2008 13:09>>>
> Hello Group,
>
> i have a list of dates and i need to now how many dates are on friday or monday.
> The dates kan be present more then ones (notation is: dd-mm-yyyy).
>
> How can i calculate this?
>
> Thanks
>
> Pedro Janssen
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com

_________________________________________________________________
Talk to your Yahoo! Friends via Windows Live Messenger.  Find out how.
http://www.windowslive.com/explore/messenger?ocid=TXT_TAGLM_WL_messenger_yahoo_082008



More information about the AccessD mailing list