Results 1 to 5 of 5

Thread: Days, Month, Year

  1. #1
    Lively Member
    Join Date
    Oct 11
    Location
    Greece
    Posts
    67

    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

  2. #2
    Web developer Nightwalker83's Avatar
    Join Date
    Dec 01
    Location
    Adelaide, Australia
    Posts
    9,836

    Re: Days, Month, Year

    Are you requesting help with your code or is it a demonstration? What does the code do?
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

  3. #3
    Lively Member
    Join Date
    Oct 11
    Location
    Greece
    Posts
    67

    Re: Days, Month, Year

    Hello Nightwalker

    the code is for a phonebook with one form in Swedish and one form
    in english as I have the national enviroment in swedish and
    my daughter (have the same enviroment as I) livs in booth canada and sweden she would to have it
    that when she goes to englis form it shall becom with the english language and
    when she goes back then it should be swedish

    thats al.

    Lenny

  4. #4
    Super Moderator Hack's Avatar
    Join Date
    Aug 01
    Location
    Searching for mendhak
    Posts
    58,292

    Re: Days, Month, Year

    Quote Originally Posted by Nightwalker83 View Post
    Are you requesting help with your code or is it a demonstration? What does the code do?
    I'm afraid I still don't know the answer to this question.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  5. #5
    Lively Member
    Join Date
    Oct 11
    Location
    Greece
    Posts
    67

    Re: [RESOLVED] Days, Month, Year

    Hi Hack


    Mybe it's the wrong place to show the code.
    as I wrote earlier form1 = Swedish language
    and form2 = English language
    because she will have it seperate from language.

    Lenny

Posting Permissions

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