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
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
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
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
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?