Hello people!
I’m having problem on lotusscript. I created a function like that:
Function checkStatus(iniPrev As NotesDateTime, iniReal As NotesDateTime, fimPrev As NotesDateTime, fimReal As NotesDateTime, situation As Integer)
End Function
And I have 4 dates do pass like parameters. But this 4 parameters are dates (mm/dd/yyyy) in STRING FORMAT. So, I’m trying to cal the function like follows:
Call checkStatus(CDate(dateAux1), CDate(dateAux3), CDate(dateAux2), CDate(dateAux4), situationAux)
But lotusscript creates a error: “Illegal parenthesized reference: CDATE”
So, I tried this:
Call checkStatus(Date(dateAux1), Date(dateAux3), Date(dateAux2), Date(dateAux4), situationAux)
But lotusscript creates a error: “Wrong number of arguments for: DATE”
And, to finish, i tried:
Call checkStatus(New NotesDateTime(dateAux1), New NotesDateTime(dateAux3), New NotesDateTime(dateAux2), New NotesDateTime(dateAux4), situationAux)
And lotusscript creates another erro: “Unexpected: New; Expected: Expression; ,; ); BYVAL”
And, my last code was:
Dim dateAux1ndt, dateAux2ndt, dateAux3ndt, dateAux4ndt As NotesDateTime
Set dateAux1ndt = New NotesDateTime(dateAux1)
Set dateAux2ndt = New NotesDateTime(dateAux2)
Set dateAux3ndt = New NotesDateTime(dateAux3)
Set dateAux4ndt = New NotesDateTime(dateAux4)
Call checkStatus(dateAux1ndt, dateAux2ndt, dateAux3ntd, dateAux4ndt, situationAux)
And the error was: “Type mismatch on: dateAux1ndt”
Anyone could help me? How can I convert String to NotesDateTime?
Thanks,