Android Question string cut

jchal

Active Member
Licensed User
Longtime User
i have the following string
mydate=DateTime.Date(DateTime.now)
i want to cut is into d1=date,d2=month, d3 =year. i am stuck can you help?
d1,d2,d3 are string
 

MarkusR

Well-Known Member
Licensed User
Longtime User
if u have a fix format as string use
value=mydate.SubString2(start,end)
log(value)
 
Upvote 0

Jeffrey Cameron

Well-Known Member
Licensed User
Longtime User
B4X:
 Dim D1, D2, D3 As String
 D1 = DateTime.GetDayOfMonth(DateTime.Now)
 D2 = DateTime.GetMonth(DateTime.Now)
 D3 = DateTime.GetYear(DateTime.Now)
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
B4X:
Day=DateTime.GetDayOfYear(DateTime.now)
Mounth=DateTime.GetMonth(DateTime.now)
Year=DateTime.GetYear(DateTime.now)
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top