Calendar Entries -> Start / End Time not showing

Hiya,

I create from one database calendar entries in the users personal mail-db. Everything seems to work smooth but for one detail:

Start and end time of the appointment are always populated as “Date Time Zimezone” instead of just “Time” as it appears in manually created entries.

Here: http://www.regenmacher.ch/before.gif

Hence in the weekly and daily view start and end times are not being displayed. However if I open the document and save it again in the client then everything displayes as it should.

Here: http://www.regenmacher.ch/after.gif

You see after I have opened, edited and saved again the time is being displayed properly however the time format was not changed at all.

My question now is how can I open / update / close all documents trough LS?

Below is now the whole agent that I use to create those entries:

Sub Initialize

Dim session As New NotesSession

Dim db As NotesDatabase

Dim email_db As New NotesDatabase ("","")

Dim view As NotesView		

Set db = session.currentdatabase



Dim db_doc As  NotesDocument		



Set db_doc = db.GetProfileDocument("f_Datenbankprofil")



Set view = db.GetView("v_Export")

Set doc = view.GetFirstDocument

Dim classes As Variant

classes = doc.VNr_disp_lookup



Dim collection As NotesDocumentCollection



' Öffenen der Mail DB

Call email_db.OpenMail



Forall classNr In classes

	

	' Collection bauen und durchloopen

	Set view = db.GetView( "v_LookUpEventId" )

	Set collection = view.GetAllDocumentsByKey(classNr, False)

	

	Dim calendar_doc As notesdocument

	Dim user As String

	user = session.UserName

	

	Dim docData As NotesDocument

	Dim dati As Variant	

	Set docData = collection.GetFirstDocument

	Dim event_start As String

	Dim event_end As String

	Dim event_hour As String

	Dim event_minute As String

	Dim startdatetime As String

	Dim enddatetime As String

	Dim time_start As Variant

	Dim time_end As Variant

	Dim event_dt As Variant

	Dim end_date As Variant

	Dim start_date As Variant

	

	While Not(docData Is Nothing)

		dati = docData.DatiAll

		If Isarray(dati)=True Then

			Forall timedate In dati

				

				' Bauen des Kalender eintrages

				Set calendar_doc = New NotesDocument(email_db)

				calendar_doc.Form = "Appointment"

				calendar_doc.AppointementType = "0"

				calendar_doc.Body= ""

				calendar_doc.Categories = "StundenplanDB"

				event_date = Day(timedate) & "." & Month(timedate) & "." & Year(timedate)

				event_dt = Datevalue(event_date)					

				

				event_hour = Hour(docData.ZeitB(0))

				If Len(event_hour) < 2 Then event_hour = "0" & event_hour Else 

				If Len(event_hour) < 2 Then event_hour = "0" & event_hour Else

				event_minute = Minute(docData.ZeitB(0))					

				If Len(event_minute) < 2 Then event_minute = "0" & event_minute Else

				If Len(event_minute) < 2 Then event_minute = "0" & event_minute Else

				event_second = "00"

				event_end = event_hour & ":" & event_minute & ":" & event_second

				time_end = Timevalue(event_end)

				end_date = event_dt + time_end

				

				event_hour = Hour(docData.ZeitV(0))

				If Len(event_hour) < 2 Then event_hour = "0" & event_hour Else

				If Len(event_hour) < 2 Then event_hour = "0" & event_hour Else

				event_minute = Minute(docData.ZeitV(0))					

				If Len(event_minute) < 2 Then event_minute = "0" & event_minute Else

				If Len(event_minute) < 2 Then event_minute = "0" & event_minute Else

				event_second = "00"					

				event_start = event_hour & ":" & event_minute & ":" & event_second

				time_start = Timevalue(event_start)

				start_date = event_dt + time_start

				

				enddatetime = event_date & " " & event_end & " CET"

				startdatetime = event_date & " " & event_start & " CET"					

				calendar_doc.CalendarDateTime= start_date

				calendar_doc.EndDate = end_date

				calendar_doc.EndTime = event_end					

				calendar_doc.EndDateTime = end_date

				calendar_doc.StartDate = start_date

				calendar_doc.StartTime = event_start					

				calendar_doc.StartDateTime = start_date

				calendar_doc.From = user

				calendar_doc.Location = docData.Raum

				calendar_doc.Logo = "stdNotesLtr0"

				calendar_doc.MeetingType = "1"

				calendar_doc.OrgTable = "CO"

				calendar_doc.Principal = user

				calendar_doc.ScheduleSwitcher = 1

				calendar_doc.SequenceNum = 1

				calendar_doc.Subject = docData.VTitel

				Call calendar_doc.Save(True, True)					

			End Forall

		End If

		Set docData = collection.GetNextDocument(docData)

	Wend

End Forall



Dim msg As String



msg = "Vorlesungstermine wurden in deinen Kalender übertragen"



Msgbox msg

End Sub

Subject: Calendar Entries → Start / End Time not showing

hi there

just a quick idea, have you tried a computewithform

eg. calendar_doc.computewithform(False, False)

it may be that the values being passed to the form aren’t being translated to the correct format. I did note from your post no change to the data types of the fields pre & ost ‘resave’. (but you never know sometimes). had something similar a little while back.

HTH

andyG

Subject: RE: Calendar Entries → Start / End Time not showing

That works now like a charm. Thx.