J jchal Active Member Licensed User Longtime User Oct 12, 2018 #1 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
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 Oct 12, 2018 #2 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 Oct 12, 2018 #3 B4X: Dim D1, D2, D3 As String D1 = DateTime.GetDayOfMonth(DateTime.Now) D2 = DateTime.GetMonth(DateTime.Now) D3 = DateTime.GetYear(DateTime.Now) Upvote 0
B4X: Dim D1, D2, D3 As String D1 = DateTime.GetDayOfMonth(DateTime.Now) D2 = DateTime.GetMonth(DateTime.Now) D3 = DateTime.GetYear(DateTime.Now)
Star-Dust Expert Licensed User Longtime User Oct 12, 2018 #4 B4X: Day=DateTime.GetDayOfYear(DateTime.now) Mounth=DateTime.GetMonth(DateTime.now) Year=DateTime.GetYear(DateTime.now) Upvote 0
B4X: Day=DateTime.GetDayOfYear(DateTime.now) Mounth=DateTime.GetMonth(DateTime.now) Year=DateTime.GetYear(DateTime.now)
J jchal Active Member Licensed User Longtime User Oct 14, 2018 #6 if i want just 18 instead 2018 for year how do i doit? Upvote 0
J jchal Active Member Licensed User Longtime User Oct 14, 2018 #8 DonManfred said: Datetime.Dateformat Click to expand... did try something like Datetime.Dateformat= "dd/mm/yy" but it still gives me 2018 Upvote 0
DonManfred said: Datetime.Dateformat Click to expand... did try something like Datetime.Dateformat= "dd/mm/yy" but it still gives me 2018
DonManfred Expert Licensed User Longtime User Oct 14, 2018 #9 jchal said: did try something like Datetime.Dateformat= "dd/mm/yy" but it still gives me 2018 Click to expand... B4X: DateTime.DateFormat = "dd/MM/yy" ' Note the UPPER MM Log(DateTime.Date(DateTime.Now)) 14/10/18 Click to expand... Upvote 0
jchal said: did try something like Datetime.Dateformat= "dd/mm/yy" but it still gives me 2018 Click to expand... B4X: DateTime.DateFormat = "dd/MM/yy" ' Note the UPPER MM Log(DateTime.Date(DateTime.Now)) 14/10/18 Click to expand...
J jchal Active Member Licensed User Longtime User Oct 14, 2018 #10 thank you Last edited: Oct 14, 2018 Upvote 0