D Dman Active Member Licensed User Longtime User Aug 17, 2012 #1 I need to get the current year in a field. I am having a major brain fart and can't seem to get it. I know it is an easy thing to do more than likely but I just can't seem to figure it out.
I need to get the current year in a field. I am having a major brain fart and can't seem to get it. I know it is an easy thing to do more than likely but I just can't seem to figure it out.
D Dman Active Member Licensed User Longtime User Aug 17, 2012 #2 I think I might have figured it out. Is this correct? B4X: Dim now As Long Dim year As Long now = DateTime.now year = DateTime.GetYear(now) Upvote 0
I think I might have figured it out. Is this correct? B4X: Dim now As Long Dim year As Long now = DateTime.now year = DateTime.GetYear(now)
M Mahares Expert Licensed User Longtime User Aug 17, 2012 #3 Here it is: B4X: Dim MyYear As Int MyYear=DateTime.GetYear(DateTime.Now) Msgbox(MyYear,"Current year") displays 2012 Upvote 0
Here it is: B4X: Dim MyYear As Int MyYear=DateTime.GetYear(DateTime.Now) Msgbox(MyYear,"Current year") displays 2012
mc73 Well-Known Member Licensed User Longtime User Aug 17, 2012 #5 Mahares said: Here it is: B4X: Dim MyYear As Int MyYear=DateTime.GetYear(DateTime.Now) Msgbox(MyYear,"Current year") displays 2012 Click to expand... My friend, dimming year as an int, will lead your app to crash in the year 2,147,483,648. Just kidding.:sign0079: :sign0136: Upvote 0
Mahares said: Here it is: B4X: Dim MyYear As Int MyYear=DateTime.GetYear(DateTime.Now) Msgbox(MyYear,"Current year") displays 2012 Click to expand... My friend, dimming year as an int, will lead your app to crash in the year 2,147,483,648. Just kidding.:sign0079: :sign0136: