Android Question DateFormat Tolerant of Spaces Between Date Components

Mahares

Expert
Licensed User
Longtime User
This is more of a curiosity question than one to solve a problem. Did anyone see in literature the validity of some of these variants.
All these variants work and deliver the same tick value:
B4X:
    Dim temp As String = "2020 :   09 :   20 12:50:50"  'works
    DateTime.DateFormat= "yyyy :MM :dd HH:mm:ss"

    Dim temp As String = "2020 :   09 :   20 12:50:50"  'works
    DateTime.DateFormat= "yyyy : MM : dd HH:mm:ss"
    
    Dim temp As String = "2020: 09: 20 12:50:50" 'works
    DateTime.DateFormat= "yyyy:MM:dd HH:mm:ss"

    Dim temp As String = "2020 : 09 : 20 12:50:50" 'works
    DateTime.DateFormat= "yyyy : MM : dd HH:mm:ss"

    Dim temp As String = "2020 :09 :20 12:50:50" 'works
    DateTime.DateFormat= "yyyy :MM :dd HH:mm:ss"

    Dim temp As String = "2020:09:20 12:50:50" 'works This is more normal  1600620650000
    DateTime.DateFormat= "yyyy:MM:dd HH:mm:ss"
But not this one:
B4X:
Dim temp As String = "2020 :09 :20 12:50:50" 'does not works
    DateTime.DateFormat= "yyyy:MM:dd HH:mm:ss"
 
Top