Results 1 to 5 of 5

Thread: [RESOLVED] show the date in a label

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2006
    Location
    Greater Manchester, UK
    Posts
    476

    Resolved [RESOLVED] show the date in a label

    How do i show the day (Saturday) not the date (10/02/07) in a label.
    If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.

    If you fail, try and try again, its the only way to success.

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: show the date in a label

    VB Code:
    1. Label1.Caption = Format$(Now, "dddd")

  3. #3
    Member
    Join Date
    Dec 2006
    Posts
    33

    Re: [RESOLVED] show the date in a label

    If anyone still read this [Resolved] post:

    Do anyone know how I make the day, month and year to be displayed in english and not in my mothertongue?
    Last edited by Bloodymess; Feb 11th, 2007 at 04:56 AM.

  4. #4
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: [RESOLVED] show the date in a label

    the simplest way is probably to just do it yourself:
    VB Code:
    1. Private strMonthNames() As String, strDayNames() As String
    2.  
    3. Private Sub Form_Load()
    4.     strMonthNames = Split("January,February,March,April,May,June,July," & _
    5.                           "August,September,October,November,December", ",")
    6.     strDayNames = Split("Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday", ",")
    7.    
    8.     Me.Caption = strDayNames(Weekday(Now, vbMonday)) & ", " & CStr(Day(Now)) & _
    9.                  " " & strMonthNames(Month(Now)) & " " & Year(Now)
    10. End Sub

  5. #5
    Member
    Join Date
    Dec 2006
    Posts
    33

    Re: [RESOLVED] show the date in a label

    Good idea, thanks.

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