Convert to date

[code]Set doc = db.CreateDocument

Dim workspace As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Dim composed As String

Set uidoc = workspace.CurrentDocument

doc.Form = “BUMA”

doc.Titel=uidoc.FieldGetText( “txtNummer” )

Dim gDatum As Variant

Dim Datumm As String

Datumm = Format(uidoc.fieldgettext(“txtDate”),“dd-mm-yyyy”)

gDatum = Cvar(Datumm)

doc.Datum = gDatum

Call doc.Save( True, True )

[/code]

Every item in the doc collection as example doc.Datum is a string

But in my Form “BUMA” Datum is a date

How can I make from doc.Datum an date/time value instead of a string???

Subject: Add…

a) Extend your code to get the document not the uidoc:

Dim mydoc as Notesdocument

Set mydoc = uidoc.document

And to get the date as time format e.g.

Varaiable = mydoc.date(0)

or maybe

doc.date = mydoc.date(0)

(There is a notesdatetime class, too, if you need more - e.g. comparison of two dates. All this is not tested, just typed out of memory)