Android Question lost in time

67biscuits

Member
What am I missing in this equation?
B4X:
Sub makeWD
    strD = $"${ms}/${ds}/${ys}"$
    DateTime.DateFormat = "MM/dd/YYYY"
    Log(strD)                            'output: 05/22/2025
    WD = DateTime.DateParse(strD)
    Log(DateTime.Date(WD))                'output: 12/30/2025
End Sub
Why or how does the date change from May 22 to Dec 30?
 

JohnC

Expert
Licensed User
Longtime User
Try "yyyy" instead of "YYYY"
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
thank goodness for standards. Now if we could standardize date formats globally. 06/06/2006 June 6th? 6 July??

Day 's / Month 's / Year

And while we are at it .... Miles , Gallons , Pounds and Ounces , Feet and Inches etc.

I thought US was the only country to still use Imperial system , apparently so do Liberia and Myanmar. there you go.
 
Upvote 0

67biscuits

Member
Day 's / Month 's / Year

And while we are at it .... Miles , Gallons , Pounds and Ounces , Feet and Inches etc.

I thought US was the only country to still use Imperial system , apparently so do Liberia and Myanmar. there you go.
I live in Canada, a metric country, I use the imperial system for almost everything. And here the date is Month/Day/Year. Some parts of amurika its Year/Month/Day
 
Upvote 0
Top