K kohle Active Member Licensed User Longtime User Jan 3, 2010 #1 It returns 03.01.0001 DateFormat ("dd.mm.yyyy") x = DateParse (DateD & "." & DateM & "." & DateY) Msgbox(Date(x))
It returns 03.01.0001 DateFormat ("dd.mm.yyyy") x = DateParse (DateD & "." & DateM & "." & DateY) Msgbox(Date(x))
corwin42 Expert Licensed User Longtime User Jan 3, 2010 #2 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
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
Erel B4X founder Staff member Licensed User Longtime User Jan 5, 2010 #3 It is better to use Now: B4X: DateFormat ("dd.mm.yyyy") msgbox(Date(Now))