View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Rudolf Sommer[_2_] Rudolf Sommer[_2_] is offline
external usenet poster
 
Posts: 1
Default Incorrect results of Weekdayname(Weekday... function???

You have to specifiy your first day of week if it differs from sunday, which
is the default in Excel. You have to specify it twice, once for the weekday
function and again for the weekdayname function
Try
?weekdayname(weekday(datevalue("26/05/2004"),vbMonday),False,vbMonday)
vbMonday = first day of week
I have only the German version of Excel help, so I cannot paste it here.
Ruedi
"Kobayashi " schrieb im
Newsbeitrag ...
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


---
Message posted from http://www.ExcelForum.com/