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
  1. Home
  2. General Programming
  3. C#
  4. Date, time and Week number

Date, time and Week number

Scheduled Pinned Locked Moved C#
helptutorial
2 Posts 2 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
    BoudewijnEctor
    wrote on last edited by
    #1

    Hi, Does anyone know wether there is some kind of element (like a DATETIMEPICKER) to get the number of the week. For example the second week of February is aprox. week 6. It doesn't matter in wich data type the numebr (string or int\long\short) is returned. Please help me! Boudewijn Ector The Netherlands

    N 1 Reply Last reply
    0
    • B BoudewijnEctor

      Hi, Does anyone know wether there is some kind of element (like a DATETIMEPICKER) to get the number of the week. For example the second week of February is aprox. week 6. It doesn't matter in wich data type the numebr (string or int\long\short) is returned. Please help me! Boudewijn Ector The Netherlands

      N Offline
      N Offline
      Nick Pirocanac
      wrote on last edited by
      #2

      I may not be thinking this through, but how about: int nWeek = Convert.ToInt32(DateTime.Now.DayOfYear / 7.0); Nick.

      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