Εμφάνιση ενός μόνο μηνύματος
  #2  
Παλιά 19-05-10, 11:15
Dangel82 Ο χρήστης Dangel82 δεν είναι συνδεδεμένος
Super Moderator
Όνομα: Αγγελος
Έκδοση λογισμικού Office: Ms-Office 2003, Ms-Office 2007
Γλώσσα λογισμικού Office: Ελληνική, Αγγλική
 
Εγγραφή: 29-04-2010
Μηνύματα: 111
Προεπιλογή

Καλημέρα Αλέξη, η λύση στο πρόβλημά σου έρχεται απ'ευθείας απο MSDN.

Κώδικας:
Function dhFirstDayInMonth(Optional dtmDate As Date = 0) As Date
    ' Return the first day in the specified month.
    If dtmDate = 0 Then
        ' Did the caller pass in a date? If not, use
        ' the current date.
        dtmDate = Date
    End If
    dhFirstDayInMonth = DateSerial(Year(dtmDate), _
     Month(dtmDate), 1)
End Function
Function dhLastDayInMonth(Optional dtmDate As Date = 0) As Date
    ' Return the last day in the specified month.
    If dtmDate = 0 Then
        ' Did the caller pass in a date? If not, use
        ' the current date.
        dtmDate = Date
    End If
    dhLastDayInMonth = DateSerial(Year(dtmDate), _
     Month(dtmDate) + 1, 0)
End Function
Και το link: Finding the Beginning or End of a Month
Απάντηση με παράθεση