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. Web Development
  3. ASP.NET
  4. getting the day name of the given date

getting the day name of the given date

Scheduled Pinned Locked Moved ASP.NET
question
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.
  • L Offline
    L Offline
    legend_of_zanado
    wrote on last edited by
    #1

    how can i get the day name (sunday or monday or ..... etc) of the given date like 03/05/2007 ?? i want to know the day name of this date or any date in this format

    B 1 Reply Last reply
    0
    • L legend_of_zanado

      how can i get the day name (sunday or monday or ..... etc) of the given date like 03/05/2007 ?? i want to know the day name of this date or any date in this format

      B Offline
      B Offline
      Brady Kelly
      wrote on last edited by
      #2

      System.Globalization.DateTimeFormatInfo.CurrentInfo.GetDayName(DateTime.Now.DayOfWeek); ... will give you the culture specific name of the current date.

      N 1 Reply Last reply
      0
      • B Brady Kelly

        System.Globalization.DateTimeFormatInfo.CurrentInfo.GetDayName(DateTime.Now.DayOfWeek); ... will give you the culture specific name of the current date.

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        Brady Kelly wrote:

        will give you the culture specific name of the current date.

        He asked for a given date, not the current date DateTime dt = DateTime.Parse("03/05/2007"); System.Globalization.DateTimeFormatInfo.CurrentInfo.GetDayName(dt.DayOfWeek)


        only two letters away from being an asset

        B 1 Reply Last reply
        0
        • N Not Active

          Brady Kelly wrote:

          will give you the culture specific name of the current date.

          He asked for a given date, not the current date DateTime dt = DateTime.Parse("03/05/2007"); System.Globalization.DateTimeFormatInfo.CurrentInfo.GetDayName(dt.DayOfWeek)


          only two letters away from being an asset

          B Offline
          B Offline
          Brady Kelly
          wrote on last edited by
          #4

          Yes, but I assumed his requirement was to find the name, not parse a date, and at least gave him credit for being able to apply the example to any date.

          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