Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Week Number from MonthCalender

Week Number from MonthCalender

Scheduled Pinned Locked Moved Visual Basic
csharp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bright2677
    wrote on last edited by
    #1

    Hi All, I Want the Week Number of the Date Selected in MonthCalendar. Can anybody plz forward me the codings in VB.Net. Thanks & Best Regards, Noor.

    Noor

    A G 2 Replies Last reply
    0
    • B Bright2677

      Hi All, I Want the Week Number of the Date Selected in MonthCalendar. Can anybody plz forward me the codings in VB.Net. Thanks & Best Regards, Noor.

      Noor

      A Offline
      A Offline
      Ajai Chaudhary
      wrote on last edited by
      #2

      When you use Datetimepicker then use the property value and day of year it will show you the day then divide it by 7 you will got the week of year. the code is : - weekofyear=(Datatimepicker1.value.dayofyear)/7 msgbox(weekofyear) If you uses C# then use toString for converstion. With regards Yogesh Agarwal

      G 1 Reply Last reply
      0
      • B Bright2677

        Hi All, I Want the Week Number of the Date Selected in MonthCalendar. Can anybody plz forward me the codings in VB.Net. Thanks & Best Regards, Noor.

        Noor

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        Have a look at the Calendar.GetWeekOfYear method. MSDN Library: GetWeekOfYear[^]

        --- single minded; short sighted; long gone;

        1 Reply Last reply
        0
        • A Ajai Chaudhary

          When you use Datetimepicker then use the property value and day of year it will show you the day then divide it by 7 you will got the week of year. the code is : - weekofyear=(Datatimepicker1.value.dayofyear)/7 msgbox(weekofyear) If you uses C# then use toString for converstion. With regards Yogesh Agarwal

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          Yogesh Agarwal wrote:

          use the property value and day of year it will show you the day then divide it by 7 you will got the week of year

          That only works for years where january the first is the first day of the week.

          --- single minded; short sighted; long gone;

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups