View Single Post
  #7 (permalink)  
Old 09-24-2007, 06:46 PM
paul j paul j is offline
Junior Member
 
Join Date: Aug 2007
Location: The netherland, Geldrop
Posts: 23
Default

Hi Erl,
I think I have to experiment with the dateformat. Normaly in the Netherlands we use dd-mm-yyyy. In the debugger yhe dateparse gives back a 0(zero) withe the format mm/dd/yyyy is returns a proper count of ticks

Sub Globals
DateFormat("dd-mm-yyyyy")
End Sub

Sub App_Start
frmMain.show

End Sub


Sub GetDate
Dim Date, subject

NewDate ="17/10/2007"
subject = "test"

AddAppointment(NewDate,subject)

End Sub

Sub AddAppointment(aDate, aSubject)
'pre aDate and aSubject have correct values
'post event has been added into the calender

Appointment.new1
Appointment.CreateNew
Appointment.Subject = aSubject
Appointment.AllDayEvent = true
Appointment.Start = DateParse(aDate)
PimCollection.New1("Appointments")
PimCollection.AddItem(appointment.value)
Msgbox(PimCollection.Count)

End Sub

Last edited by paul j : 09-24-2007 at 06:58 PM.
Reply With Quote