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

AM and PM designation?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 30th 07, 06:05 PM posted to microsoft.public.outlook.program_vba
DENNIS BROWN
external usenet poster
 
Posts: 51
Default AM and PM designation?

With the .Start property of an appointment being "6/27/2007 9:30:00", how can I tell if it is morning or evening, AM or PM?

--

Thanks,
Dennis
Ads
  #2  
Old July 30th 07, 07:04 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default AM and PM designation?

Start property (just like any other date/time property) returns a date/time value, *not* a string.When you look at thee value in the debugger or convert it to a string, it is converted using the current date/time display settings,
Date/time type in COM is essentially a floting point value with the integer part being the number of days since December 31, 1899 and the fractional part being th time of the day (your code really does not have to be aware of this). All programming languages include functions for handling dates.
What exactly are you trying to do?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"DENNIS BROWN" wrote in message . ..
With the .Start property of an appointment being "6/27/2007 9:30:00", how can I tell if it is morning or evening, AM or PM?

--

Thanks,
Dennis
  #3  
Old July 30th 07, 08:26 PM posted to microsoft.public.outlook.program_vba
DENNIS BROWN
external usenet poster
 
Posts: 51
Default AM and PM designation?

I am saving it into a string to present as a message to the user at a later time.
I'm using a scripting language specific to an adaptive screen reading software package for the blind, and I'm retrieving the .Start, then parsing the date from the time, then stripping off the seconds, and then announcing it to the blind user via the sound card.
I'm trying to denote if it is am or pm, and the scripting language doesn't have that type of function.
We can access VBA objects, just not events, but if the vba function requires a date type, then we have no means of passing it that unless we pass the .Start property directly.



--

Thanks,
Dennis
"Dmitry Streblechenko" wrote in message ...
Start property (just like any other date/time property) returns a date/time value, *not* a string.When you look at thee value in the debugger or convert it to a string, it is converted using the current date/time display settings,
Date/time type in COM is essentially a floting point value with the integer part being the number of days since December 31, 1899 and the fractional part being th time of the day (your code really does not have to be aware of this). All programming languages include functions for handling dates.
What exactly are you trying to do?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"DENNIS BROWN" wrote in message . ..
With the .Start property of an appointment being "6/27/2007 9:30:00", how can I tell if it is morning or evening, AM or PM?

--

Thanks,
Dennis
  #4  
Old July 30th 07, 08:38 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default AM and PM designation?

I don't see what the problem is - VB script or VBA can handle date/time values perfectly fine.
Store the value as date time, not as a string, perform conversion to a string when you need to present the data to an end user, it makes no sense to use strings as internal storage for date/time value.

If you need to parse a date/time value, use DatePart() fucniton.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"DENNIS BROWN" wrote in message . ..
I am saving it into a string to present as a message to the user at a later time.
I'm using a scripting language specific to an adaptive screen reading software package for the blind, and I'm retrieving the .Start, then parsing the date from the time, then stripping off the seconds, and then announcing it to the blind user via the sound card.
I'm trying to denote if it is am or pm, and the scripting language doesn't have that type of function.
We can access VBA objects, just not events, but if the vba function requires a date type, then we have no means of passing it that unless we pass the .Start property directly.



--

Thanks,
Dennis
"Dmitry Streblechenko" wrote in message ...
Start property (just like any other date/time property) returns a date/time value, *not* a string.When you look at thee value in the debugger or convert it to a string, it is converted using the current date/time display settings,
Date/time type in COM is essentially a floting point value with the integer part being the number of days since December 31, 1899 and the fractional part being th time of the day (your code really does not have to be aware of this). All programming languages include functions for handling dates.
What exactly are you trying to do?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"DENNIS BROWN" wrote in message . ..
With the .Start property of an appointment being "6/27/2007 9:30:00", how can I tell if it is morning or evening, AM or PM?

--

Thanks,
Dennis
  #5  
Old July 31st 07, 12:07 AM posted to microsoft.public.outlook.program_vba
DENNIS BROWN
external usenet poster
 
Posts: 51
Default AM and PM designation?

My scripting language can't handle a date type, so I have to store it as a string. It was developed to handle some of the inaccessibility issues with Office apps, and not meant to be a full VBA-compliant language. Several times I have wished we had a date type, but no dice.

--

Thanks,
Dennis
"Dmitry Streblechenko" wrote in message ...
I don't see what the problem is - VB script or VBA can handle date/time values perfectly fine.
Store the value as date time, not as a string, perform conversion to a string when you need to present the data to an end user, it makes no sense to use strings as internal storage for date/time value.

If you need to parse a date/time value, use DatePart() fucniton.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"DENNIS BROWN" wrote in message . ..
I am saving it into a string to present as a message to the user at a later time.
I'm using a scripting language specific to an adaptive screen reading software package for the blind, and I'm retrieving the .Start, then parsing the date from the time, then stripping off the seconds, and then announcing it to the blind user via the sound card.
I'm trying to denote if it is am or pm, and the scripting language doesn't have that type of function.
We can access VBA objects, just not events, but if the vba function requires a date type, then we have no means of passing it that unless we pass the .Start property directly.



--

Thanks,
Dennis
"Dmitry Streblechenko" wrote in message ...
Start property (just like any other date/time property) returns a date/time value, *not* a string.When you look at thee value in the debugger or convert it to a string, it is converted using the current date/time display settings,
Date/time type in COM is essentially a floting point value with the integer part being the number of days since December 31, 1899 and the fractional part being th time of the day (your code really does not have to be aware of this). All programming languages include functions for handling dates.
What exactly are you trying to do?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"DENNIS BROWN" wrote in message . ..
With the .Start property of an appointment being "6/27/2007 9:30:00", how can I tell if it is morning or evening, AM or PM?

--

Thanks,
Dennis
 




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


All times are GMT +1. The time now is 10:20 AM.


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.