Hi Guys,
I have an app i released on the play store and a few people are coming back with a problem that did not show up in testing.
What happens is the user enters a start date into a dialog box they are instructed to enter that date as MM/dd/yyyy.
I then use this date and compare it against DateTime.Date(DateTime.Now) and then plus or minus a day or two if the statement is True then i display certain information into labels.
This is an example of the code for displaying the Info:
On 90% of devices this works but i found a device that it does not work on and i created a label to display
and this shows as MMM d,y even though under android's date & time settings the date format is set to 01/17/2013 (MM/dd/yyyy).
How do I fix this?

I have an app i released on the play store and a few people are coming back with a problem that did not show up in testing.
What happens is the user enters a start date into a dialog box they are instructed to enter that date as MM/dd/yyyy.
I then use this date and compare it against DateTime.Date(DateTime.Now) and then plus or minus a day or two if the statement is True then i display certain information into labels.
This is an example of the code for displaying the Info:
B4X:
Sub SetWorkout
Dim SetDate As String
SetDate = cd
If DateTime.Date(DateTime.Now) = SetDate Then
lblWDis.Text = "Fit Test"
lblPhase.Text = "1"
lblDurDis.Text = "00:25:38"
End If
If DateTime.Date(DateTime.Now - 1 * DateTime.TicksPerDay) = SetDate Then
lblWDis.Text = "Plyometric Cardio Circuit"
lblPhase.Text = "1"
lblDurDis.Text = "00:41:47"
End If
If DateTime.Date(DateTime.Now - 2 * DateTime.TicksPerDay) = SetDate Then
lblWDis.Text = "Cardio Power & Resistance"
lblPhase.Text = "1"
lblDurDis.Text = "00:39:19"
End If
End Sub
On 90% of devices this works but i found a device that it does not work on and i created a label to display
B4X:
DateTime.DeviceDefaultDateFormat
How do I fix this?