CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Date

  1. #1
    Join Date
    Apr 2001
    Posts
    33

    Date

    how to i write a code for get the day of the date where i enter date but i want to know which day is that.

    example, i enter 29/06/2001 then i can gee the day is FRIDAY.




    Regards,
    Wilson Chai

  2. #2
    Join Date
    May 2001
    Location
    Russia
    Posts
    200

    Re: Date

    WeekDay = Format(YourDate, "dddd")

    Andy Tower

  3. #3
    Join Date
    Feb 2001
    Posts
    54

    Re: Date

    Hello Wilson:

    You can this code:

    days = Format(Text2.Text, "dddd") 'dddd will give you day
    Text1.Text = days

    Good Luck
    Please send back a reply
    Thank you


  4. #4
    Join Date
    Apr 2001
    Posts
    33

    Date

    days = Format(Text2.Text, "dddd") 'dddd will give you day
    Text1.Text = days


    dddd is what day is that ? sunday... or is given set by us and not by system

    Regards,
    Wilson Chai

  5. #5
    Join Date
    May 2001
    Location
    Russia
    Posts
    200

    Re: Date

    Format(Text2.Text, "dddd", vbMonday)
    but if you not set 3 parameter, used system default

    Andy Tower

  6. #6
    Join Date
    Feb 2001
    Posts
    54

    Re: Date

    Hello:
    Text2.text is your input and 'dddd' is the format that translate Text2.text into the day you want. For example, if you put into Text2.text: 25/06/2001, you will get Monday.

    I hope this answers your question.
    Robert Moy


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

Featured