A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Weekday function



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 25th 07, 10:41 PM posted to microsoft.public.outlook.program_vba
DENNIS BROWN
external usenet poster
 
Posts: 51
Default Weekday function

When using the Weekday function, can I use a string, and if so, what format?
I have to retrieve the needed date from the Start property of an appointment item, but what format will I need to convert the string to in order to get the Weekday function to work?

--

Thanks,
Dennis
  #2  
Old July 26th 07, 12:25 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Weekday function

The Weekday() function takes a date as its argument, so if myAppt is your appointment:

intDayOfWeek = Weekday(myAppt.Start)

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"DENNIS BROWN" wrote in message news When using the Weekday function, can I use a string, and if so, what format?
I have to retrieve the needed date from the Start property of an appointment item, but what format will I need to convert the string to in order to get the Weekday function to work?

--

Thanks,
Dennis
  #3  
Old July 26th 07, 01:34 PM posted to microsoft.public.outlook.program_vba
DENNIS BROWN
external usenet poster
 
Posts: 51
Default Weekday function

But what if MyApp.Start contains something like
6/26/2007 9:35:00
Will it still process it?

--

Thanks,
Dennis
"Sue Mosher [MVP-Outlook]" wrote in message ...
The Weekday() function takes a date as its argument, so if myAppt is your appointment:

intDayOfWeek = Weekday(myAppt.Start)

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"DENNIS BROWN" wrote in message news When using the Weekday function, can I use a string, and if so, what format?
I have to retrieve the needed date from the Start property of an appointment item, but what format will I need to convert the string to in order to get the Weekday function to work?

--

Thanks,
Dennis
  #4  
Old July 26th 07, 02:01 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Weekday function

Why not try it and see for yourself? Just type this into the Immediate window in VBA and press Enter:

? Weekday(#6/26/2007 9:35:00#)

TIP: The way to become productive and knowledgeable writing any kind of code is to experiment on your own.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"DENNIS BROWN" wrote in message . ..
But what if MyApp.Start contains something like
6/26/2007 9:35:00
Will it still process it?

--

Thanks,
Dennis
"Sue Mosher [MVP-Outlook]" wrote in message ...
The Weekday() function takes a date as its argument, so if myAppt is your appointment:

intDayOfWeek = Weekday(myAppt.Start)


"DENNIS BROWN" wrote in message news When using the Weekday function, can I use a string, and if so, what format?
I have to retrieve the needed date from the Start property of an appointment item, but what format will I need to convert the string to in order to get the Weekday function to work?

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Weekday in AppointmentItem DENNIS BROWN Outlook and VBA 1 June 21st 07 08:10 PM
how to print same weekday over many months [email protected] Outlook - Calandaring 0 May 7th 07 10:09 PM
Weekday not showing George Hill Outlook - Calandaring 2 July 7th 06 03:51 AM
How do I set Calendar Recurrence of 1st and 3rd weekday of the mo. Mark V. Outlook - Calandaring 2 June 27th 06 01:37 PM
Outlook should have a recurrence option of fifth weekday(and more johnnythehat Outlook - Calandaring 2 March 12th 06 10:47 PM


All times are GMT +1. The time now is 11:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.