From: JLGWhiz on
Did you read Ossie's post?



"sort" <sort(a)discussions.microsoft.com> wrote in message
news:13DB4AF8-B7A2-4BC0-9CEC-5C5BCD8D9C51(a)microsoft.com...
> =WEEKDAY(DATE(2009,11,15),2) would be perfect but I am looking for
> something
> to put in a VBA program not in a cell.


From: FSt1 on
hi
if your given date is in A1, try this to put the weekday name in b1......
Sub xlcalcit()
Dim s As String
Dim d As String
s = [A1].Value
d = WeekdayName(Weekday(s))
[B1].Value = d
End Sub

"sort" wrote:

> How do you find the Day of Week from a given date, "dd/mm/yyyy". I know it
> is given by "dddd" but I need the reverse process. I would be open to the
> numbers of the Day of Week too.
>
> I am given the:
> mm=11
> dd=15
> yyyy=2009
>
> find
> dddd or number of the Day of Week
From: FSt1 on
afterthought
the code i posted will work on any date, past, current or future.

regards
FSt1

"FSt1" wrote:

> hi
> if your given date is in A1, try this to put the weekday name in b1......
> Sub xlcalcit()
> Dim s As String
> Dim d As String
> s = [A1].Value
> d = WeekdayName(Weekday(s))
> [B1].Value = d
> End Sub
>
> "sort" wrote:
>
> > How do you find the Day of Week from a given date, "dd/mm/yyyy". I know it
> > is given by "dddd" but I need the reverse process. I would be open to the
> > numbers of the Day of Week too.
> >
> > I am given the:
> > mm=11
> > dd=15
> > yyyy=2009
> >
> > find
> > dddd or number of the Day of Week