Results 1 to 5 of 5

Thread: Days, Month, Year

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2011
    Location
    Greece
    Posts
    164

    Days, Month, Year

    I get some help for this code
    but copy it as you like change
    month and days what you like.

    I put this code in Form Load event.
    vb Code:
    1. Dim MyDay As Variant
    2.  Dim MyMonth As Variant
    3.  Dim WD As Long
    4.  Dim MM As Long
    5.  Dim MyDate1, MyDate2, EngDays
    6.  
    7. '********************************* Date & Year
    8.  MyDate1 = StrConv(Format$(Date, "dd"), vbProperCase)
    9.  MyDate2 = StrConv(Format$(Date, "yyyy"), vbProperCase)
    10.  
    11.  '********************************* Days
    12.  MyDay = Array("Monday", "Tuesday", "Wednesday", "Thursday", "Fridag", "Saterday", "Sunday")
    13.  WD = Weekday(Now, vbMonday) 'day of week, where Monday is the 1st day of the week (1 based)
    14.  
    15.  '********************************* Month
    16.  MyMonth = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
    17.  MM = Month(Now)
    18.  
    19.  '************************* Day ************** Date *********** Month *****************Year
    20.  LabelDatumEng.Caption = MyDay(WD - 1) & " " & MyDate1 & " " & MyMonth(MM - 1) & " " & MyDate2
    21.  
    22.  '********************************** END Date Year
    Lenny
    Last edited by Hack; Oct 24th, 2011 at 10:59 AM. Reason: Added Highlight Tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width