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. how to convert date into english words

how to convert date into english words

Scheduled Pinned Locked Moved ASP.NET
helptutorial
3 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.
  • S Offline
    S Offline
    Spurple
    wrote on last edited by
    #1

    hi, i want to convert a date selected from calender control into english words. e.g 11/01/1948 to-- eleven january nineteen fourty eigth. can anybody help!

    G S 2 Replies Last reply
    0
    • S Spurple

      hi, i want to convert a date selected from calender control into english words. e.g 11/01/1948 to-- eleven january nineteen fourty eigth. can anybody help!

      G Offline
      G Offline
      Gamzun
      wrote on last edited by
      #2

      guess you've to write your own algo for that :)

      1 Reply Last reply
      0
      • S Spurple

        hi, i want to convert a date selected from calender control into english words. e.g 11/01/1948 to-- eleven january nineteen fourty eigth. can anybody help!

        S Offline
        S Offline
        sandamalsilva
        wrote on last edited by
        #3

        you have to use a method which returns the word for each number. For an example refer the following code. public string getWordForNumber(int number) { string word = null; switch (number) { case 1 : word = "One"; break; case 2: word = "Two"; break; .. .. .. default: break; } return word; } For 30/31 days of month, you dont need 30/31 case on your switch. use another method which returns 10 to the power 1 numbers, For an example, for 21 --> for number 2 it should return Twenty, using the above method you can get next number, for number 1 - One, All together --> Twenty One

        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