View Single Post
  #3 (permalink)  
Old 12-13-2007, 04:02 PM
Gerd Gerd is offline
Junior Member
 
Join Date: Nov 2007
Location: Ulm, Germany
Posts: 10
Arrow

Now i know a little bit more...

Quote:
Originally Posted by Erel View Post
1)

2) I don't see this behavior when I run similar code.
What happens if you do: Msgbox(DateParse("01/01/1601")) ?
I see: 504911232 000000000

at least two hours i tried some code to create a new or update an existing contact with an birthday entry :

This date/code really fails:
Contact.Birthday = DateParse("01/01/1601")

And this really works:
Contact.Birthday = DateParse("01/01/1901")

BUT!!!

The error accours not at putting the data into Contact.Birthday! The errors occours at:
Contact.update or PimCol.AddItem(Contact.Value)


+++++++++++++++++++++++++++++++++++
Code sample - in any case msgbox() will be showed with the ticks.
After closing the MsgBox the Message "Fail" will be displayed (or not)
+++++++++++++++++++++++++++++++++++

Sub App_Start
ErrorLabel(errHandler)
Form1.Show
Contact.New1
PimCol.New1("Contacts")
Contact.CreateNew
Contact.LastName="Tester"
' Contact.Birthday = DateParse("01/01/1901") ' with this line it works
Contact.Birthday = DateParse("01/01/1601") ' with this line it fails
Msgbox(Contact.Birthday)

PimCol.AddItem(Contact.Value)
Sleep(3000)
AppClose

errHandler:
Label1.Text = "FAIL!"
Form1.Refresh
Sleep(4000)
AppClose
End Sub


+++++++++++++++
Reply With Quote