Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Get the integer valure from the current date

Use the worksheet function Weekday().

HTH,
Merjet


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I add an integer to an existing integer? Aaron Excel Worksheet Functions 3 December 17th 09 09:46 PM
Figuring Vacation Hrs. Earned using Current Date minus Hire Date Sharon Excel Worksheet Functions 6 May 3rd 07 10:32 PM
Make date change in excel to current date when opening daily? jamie Excel Discussion (Misc queries) 3 March 1st 06 03:37 PM
Can I automatically enter the current date or current time into a Ben New Users to Excel 7 October 19th 05 03:38 PM
Calculating days between current date and a date in future NETWORKDAYS() function Faheem Khan Excel Worksheet Functions 2 February 10th 05 07:18 PM


All times are GMT +1. The time now is 04:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"