ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Get the integer valure from the current date (https://www.excelbanter.com/excel-programming/278491-get-integer-valure-current-date.html)

Andrew Haycock

Get the integer valure from the current date
 
Hi,

How do i get the integer value for the current day.

I know i need to use the sysdate and then perform some action on that
to tell me the integer representation of the day.

eg SUNDAY = 0
MONDAY = 1
etc.

Please any help is much appriciated

Ron de Bruin

Get the integer valure from the current date
 
You can use the Weekday function in VBA code

Sub test()
MsgBox Application.WorksheetFunction.Weekday(Now, 1)
End Sub



--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Andrew Haycock" wrote in message om...
Hi,

How do i get the integer value for the current day.

I know i need to use the sysdate and then perform some action on that
to tell me the integer representation of the day.

eg SUNDAY = 0
MONDAY = 1
etc.

Please any help is much appriciated




merjet

Get the integer valure from the current date
 
Use the worksheet function Weekday().

HTH,
Merjet




All times are GMT +1. The time now is 09:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com