Results 1 to 4 of 4

Thread: integer to month name? [Resolved]

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    integer to month name? [Resolved]

    Does anyone know an easy way to convert a integer (1-12) into a month name (January-December)?

    I could do it with a switch or an if-else, but I figure there has to be an easier way.
    Last edited by ober0330; Jan 12th, 2004 at 08:47 AM.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

  3. #3
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476
    Do you really just have an integer?

    it would an easy job if you had sth like a timestamp.

    Like this:

    PHP Code:
    <?php
    $month 
    date(F);
    echo 
    $month;
    ?>
    Stephan
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

  4. #4

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Sorry, don't have a timestamp, the user is entering a month and year of a report that they want.

    Thanks mendhak. You da man
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width