DateD and DateM return the day/month without leading zeros so your code results in:
x = DateParse ("3.1.2010")
and this does not match your Dateformat.
Try
x = DateParse (Format(DateD, "D2") & "." & Format(DateM, "D2") & "." & Format(DateY, "D4"))
instead