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 - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

UserProperties Date/Time format



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 22nd 06, 04:01 PM posted to microsoft.public.outlook.program_forms
Bill
external usenet poster
 
Posts: 31
Default UserProperties Date/Time format

I have a lot of date/time fields in a public folder and its corresponding
form, formatted as "9/22/2006" or "8:24 AM" depending on their application
and user preference. These formats hold within the form, but if I populate a
Word doc's bookmarks using UserProperties, they are all formatted as
"9/22/2006 8:24:00 AM" which makes a big ugly mess.

I can use FormatDateTime( ) on the UserProperties, but it does not offer a
good solution for time. vbShortTime format is military time. vbLongTime
includes the seconds, which I don't want either.

It would seem I'm faced with these choices:

Pull the display values from the form controls instead of the
UserProperties.
Doing string manipulation on the UserProperties to obtain time strings like
"8:24 AM"
Redo the Word template with Form fields formatted as desired (would this
even work?) .

Are there other simpler approaches?

Thanks,

Bill Le May


Ads
  #2  
Old September 22nd 06, 04:25 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default UserProperties Date/Time format

Write your own function to produce the desired format, using standard functions like Month() and Day() to return each date/time part.

Formatting the Word fields might be worth trying.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Bill" wrote in message ...
I have a lot of date/time fields in a public folder and its corresponding
form, formatted as "9/22/2006" or "8:24 AM" depending on their application
and user preference. These formats hold within the form, but if I populate a
Word doc's bookmarks using UserProperties, they are all formatted as
"9/22/2006 8:24:00 AM" which makes a big ugly mess.

I can use FormatDateTime( ) on the UserProperties, but it does not offer a
good solution for time. vbShortTime format is military time. vbLongTime
includes the seconds, which I don't want either.

It would seem I'm faced with these choices:

Pull the display values from the form controls instead of the
UserProperties.
Doing string manipulation on the UserProperties to obtain time strings like
"8:24 AM"
Redo the Word template with Form fields formatted as desired (would this
even work?) .

Are there other simpler approaches?

Thanks,

Bill Le May


  #3  
Old September 22nd 06, 06:09 PM posted to microsoft.public.outlook.program_forms
Bill
external usenet poster
 
Posts: 31
Default UserProperties Date/Time format

"Hollis Paul [MVP - Outlook]" wrote...

As far as I know there are no simple solutions to this. I don't think
getting the values from the controls will produce anything different.


Actually the Text property of the control gives me what I want:

Set objPage = Item.GetInspector.ModifiedFormPages("Travelers")
Set txtControl = objPage.Controls("txtTraveler1DepartTime")
strTime = txtControl.Text

Thanks, Hollis.


  #4  
Old September 22nd 06, 06:23 PM posted to microsoft.public.outlook.program_forms
Hollis Paul [MVP - Outlook]
external usenet poster
 
Posts: 138
Default UserProperties Date/Time format

In article , Bill wrote:
Are there other simpler approaches?

As far as I know there are no simple solutions to this. I don't think
getting the values from the controls will produce anything different.

Search at www.outlook-code.com and see if you can find a discussion of
this problem or example code.

--
Hollis Paul
Mukilteo, WA USA


 




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
Date format Roger Outlook Express 4 September 13th 06 03:46 AM
date format on custome field artmyth Outlook - Using Forms 3 July 19th 06 11:32 PM
Date Format in Outlook Bonnie Outlook - Calandaring 3 April 18th 06 07:15 PM
Changing date format in outlook express ibowey Outlook Express 2 March 13th 06 01:33 PM
Date format when printing R Fourt Outlook - Using Forms 0 January 11th 06 03:41 PM


All times are GMT +1. The time now is 05:50 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.