From: sort on 30 May 2010 17:26 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: Lars-�ke Aspelin on 30 May 2010 17:36 On Sun, 30 May 2010 14:26:01 -0700, sort <sort(a)discussions.microsoft.com> 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 The formula =WEEKDAY(DATE(2009,11,15),2) returns the value 7, indicating that November 15, 2009 was a Sunday. Hope this helps / Lars-�ke
From: Helmut Meukel on 30 May 2010 18:14 "Lars-�ke Aspelin" <larske(a)REMOOVEtelia.com> schrieb im Newsbeitrag news:vgm506t464fskd9uici634lchj1p28g0ie(a)4ax.com... > On Sun, 30 May 2010 14:26:01 -0700, sort > <sort(a)discussions.microsoft.com> 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 > > The formula > =WEEKDAY(DATE(2009,11,15),2) > returns the value 7, indicating that November 15, 2009 was a Sunday. > > Hope this helps / Lars-�ke > Or in VBA: Dim mm as Integer, dd as Integer, yyyy as Integer, dddd as string mm=11 dd=15 yyyy=2009 dddd = Format(DateSerial(yyyy, mm, dd), "dddd") Helmut.
From: OssieMac on 30 May 2010 18:38 Additional options to the previous answer. The following returns the day of the week for any date. (I have used today's date in each of the examples) On a worksheet: =TEXT(TODAY(),"ddd") or =TEXT(TODAY(),"dddd") In VBA Dim DayOfWeek As String DayOfWeek = Format(Date, "ddd") MsgBox DayOfWeek DayOfWeek = Format(Date, "dddd") MsgBox DayOfWeek -- Regards, OssieMac "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: sort on 30 May 2010 18:58 =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.
|
Next
|
Last
Pages: 1 2 Prev: delete file in addin directory Next: Change Color for Drawing Line Object |