Android Question Strict three-letter month names in formatted dates

Brian Dean

Well-Known Member
Licensed User
Longtime User
I am storing dates in integer variables as a "day value" - ie whole days derived from normal DateTime values. I convert these values to text as follows :
' Convert [day] value to date string:
Private Sub dayToDate(day As Int) As String
    DateTime.DateFormat = "dd MMM yy"
    Dim conv As Long = day
    Return DateTime.Date(conv * 24 * 3600 * 1000)
End Sub
However dates in September are being formatted with "Sept" (four characters) which is giving me a problem as I have room for only three characters ("Sep"). From what I read MMM should specify a three-letter month name. Have I overlooked something?
 

mangojack

Expert
Licensed User
Longtime User

Additional posts in this thread are worth a read as well.
 
Last edited:
Upvote 0
Top