View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Incorrect results of Weekdayname(Weekday... function???

On Wed, 2 Jun 2004 08:05:30 -0500, Kobayashi
wrote:

I'm trying to determine the day of the week for a date, which will then
be used in an IF argument. However, when I put the following in the
debug pane I get 'Thursday' as the result, when clearly today is
Wednesday!???

I'm actually using a variable which contains the date of "26/05/2004",
but this doesn't work either?

I'm using Excel 2000 with UK regional settings.

?weekdayname(weekday("02/06/2004"))

I'm sure this is going to be something very simple and slightly
embarassing for me when resolved but help would be appreciated!

Very confused!

Adrian


VBA can be very US-Centric. I would suggest something like:

?weekdayname(weekday(dateserial(2004,6,2)))


--ron