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. Visual Basic
  4. VB.NET Display Month in Text Not Number Format

VB.NET Display Month in Text Not Number Format

Scheduled Pinned Locked Moved Visual Basic
csharphelptutorialquestion
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.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    Private Sub showMonth() MonthlyCalendar1.FirstDate = d txtMonth.Text = DatePart(DateInterval.Month, d) & "," & " " & DatePart (DateInterval.Year, d) End Sub The above code displays the month in a number format like 4, 2005. I want to know how to modify the above code to display the month in April, 2005 format. How should I do it? I have tried select case but I get an error saying that I can't combine 'Date' with an 'Integer'.

    D 1 Reply Last reply
    0
    • A Anonymous

      Private Sub showMonth() MonthlyCalendar1.FirstDate = d txtMonth.Text = DatePart(DateInterval.Month, d) & "," & " " & DatePart (DateInterval.Year, d) End Sub The above code displays the month in a number format like 4, 2005. I want to know how to modify the above code to display the month in April, 2005 format. How should I do it? I have tried select case but I get an error saying that I can't combine 'Date' with an 'Integer'.

      D Offline
      D Offline
      dpagka
      wrote on last edited by
      #2

      Try the command Format Here dt is a datetimepicker control Format(Me.dt.Value, "d/MMM/yyyy")

      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