Date/Calendar Controls

XerVision

Member
Licensed User
Is there a quick way to get date information- per se, Number of days in a particular month- in a particular year. I would like to make a customized calendar with buttons that light up and provides various functionailties.
 

Cableguy

Expert
Licensed User
You do have a calendar control....Try see the help file to see if it does what you want...
 

specci48

Well-Known Member
Licensed User
Hi XerVision,

the are no build-in functions for these values but you can use small subs like:

B4X:
Sub NumberOfDaysInMonth(month, year)
   if month < 10 then
      month = "0" & month
   end if   
   return   DateDay(DateAdd(DateParse(month & "/01/" & year), 0, +1, -1))
End Sub

Sub NumberOfDaysInYear(year)
   return   DateDayOfYear(DateAdd(DateParse("01/01/" & year), +1, 0, -1))
End Sub

specci48
 
Top