Date/Calendar Controls

Discussion in 'Questions (Windows Mobile)' started by XerVision, Jun 8, 2007.

  1. XerVision

    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.
  2. Cableguy

    Cableguy Expert Licensed User

    You do have a calendar control....Try see the help file to see if it does what you want...
  3. specci48

    specci48 Well-Known Member Licensed User

    Hi XerVision,

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

    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), +10, -1))
    End Sub