Android Question Odd DateFormat issue

Homerclese

Member
Licensed User
Longtime User
I have a date column in an SQLite database. One record has a date of June 30, 2013. I want to use the following code to display the date:

B4X:
DateTime.Date(myDateValue)

So, if I set:

B4X:
DateTime.DateFormat = "yyyy-mm-dd"

Then the date is displayed as 2013-06-30. All good.

But as I want to display the date as "30 Jun 2013" I set:

B4X:
DateTime.DateFormat = "d MMM yyyy"

The problem is that after this the date is displayed as 30 Jan 2013...the month of June has been replaced with January!
 

Homerclese

Member
Licensed User
Longtime User
Doh! That's a hangover from the VB days for me... The issue was occurring when I was converting the JSON date to an SQLite date, not when displaying it.

Thanks Erel. You provide incredibly responsive support! :)
 
Upvote 0
Top