PC Review


Reply
Thread Tools Rate Thread

Concatenating Date and Time

 
 
=?Utf-8?B?U2hlcndvb2Q=?=
Guest
Posts: n/a
 
      7th Sep 2005
Greetings,

I have the following line of code in Outlook 2000 and am receiving a
run-time error 13 ("Type Mismatch") when I try to execute it:

myApptItem.Start = dteLicRenewalSubmitBy & #8:00:00 AM#

I'm trying to concatenate a date (contained in a variable) to a literal time
(e.g., "8:00:00 AM") in order to create a new appointment item. However, my
syntax must be wrong due to the error I am receiving.

Here is the entire "IF" statement:

If Not IsNull(rs.Fields("Lic Renewal Submit By").Value) Then
dteLicRenewalSubmitBy = rs.Fields("Lic Renewal Submit By").Value
Set myApptItem = myOlApp.CreateItem(olAppointmentItem)
myApptItem.Start = dteLicRenewalSubmitBy & #8:00:00 AM#
myApptItem.End = dteLicRenewalSubmitBy & #8:30:00 AM#
myApptItem.Subject = "License Renewal Submit By"
myApptItem.Body = strState & Chr(13) & "License Renewal Submit
By " & dteLicRenewalSubmitBy
myApptItem.Close (olSave)
Set myApptItem = Nothing
End If

Thanks in advance!
--
Sherwood
 
Reply With Quote
 
 
 
 
Michael Bauer
Guest
Posts: n/a
 
      7th Sep 2005
Am Tue, 6 Sep 2005 17:13:57 -0700 schrieb Sherwood:

I suppose you need to add a space between the date and time.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook

> Greetings,
>
> I have the following line of code in Outlook 2000 and am receiving a
> run-time error 13 ("Type Mismatch") when I try to execute it:
>
> myApptItem.Start = dteLicRenewalSubmitBy & #8:00:00 AM#
>
> I'm trying to concatenate a date (contained in a variable) to a literal

time
> (e.g., "8:00:00 AM") in order to create a new appointment item. However,

my
> syntax must be wrong due to the error I am receiving.
>
> Here is the entire "IF" statement:
>
> If Not IsNull(rs.Fields("Lic Renewal Submit By").Value) Then
> dteLicRenewalSubmitBy = rs.Fields("Lic Renewal Submit

By").Value
> Set myApptItem = myOlApp.CreateItem(olAppointmentItem)
> myApptItem.Start = dteLicRenewalSubmitBy & #8:00:00 AM#
> myApptItem.End = dteLicRenewalSubmitBy & #8:30:00 AM#
> myApptItem.Subject = "License Renewal Submit By"
> myApptItem.Body = strState & Chr(13) & "License Renewal Submit
> By " & dteLicRenewalSubmitBy
> myApptItem.Close (olSave)
> Set myApptItem = Nothing
> End If
>
> Thanks in advance!

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenating Date and Time from two differnt fields Tamer Ibrahim Microsoft ASP .NET 1 17th Jan 2008 12:54 PM
CONCATENATING DATE AND TIME =?Utf-8?B?YmxhZGVsb2Nr?= Microsoft Excel Worksheet Functions 1 10th Nov 2005 01:09 AM
RE: CONCATENATING DATE AND TIME =?Utf-8?B?R2FyeScncyBTdHVkZW50?= Microsoft Excel Worksheet Functions 0 10th Nov 2005 12:34 AM
RE: CONCATENATING DATE AND TIME =?Utf-8?B?YmxhZGVsb2Nr?= Microsoft Excel Worksheet Functions 0 10th Nov 2005 12:29 AM
Concatenating Date and Time Fields for Lag Time Analyses =?Utf-8?B?UmljaFQ=?= Microsoft Access Queries 2 3rd Aug 2004 07:05 PM


Features
 

Advertising
 

Newsgroups
 


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