Android Question MS SQL DateTime on ScrollView

Stephenz43

Member
Licensed User
Longtime User
I am having a difficulty with the formatting of a column in a scrollview. The column in retrieved from a MS SQL database as follows :

row(3) = n.Get("dateShipped")

instead of a date I am getting /Date(12315ect

How should I be formating to just get 04/15/2013
 

Stephenz43

Member
Licensed User
Longtime User
The value retrieved from the sql Server database should be a date like '05/16/2013' . I'm getting /Date(1377586800000)/
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Hopefully wl's previous post is what you are looking for. If not, here is a way to parse the string:
B4X:
Dim MyDate As String = "/Date(1377586800000)/"
MyDate=MyDate.Substring2(MyDate.indexof("(")+1, MyDate.indexof(")")) 'returns 1377586800000
Msgbox(DateTime.Date(MyDate),"") 'displays 08/27/2013
 
Upvote 0
Top