Explode a string?

Discussion in 'Programming' started by HorrorMovies, Jun 22, 2009.

  1. #1
    I am needing to explode a string... Well, actually its a date time stamp.

    I have dates and times in the database

    example: 02/05/2009 10:43 AM

    I am wanting to get a hold of the '05' part of the date so I can change it into the month name (I am in the UK so its dd/mm/yyyy).


    Does anyone know how to do it?
     
    HorrorMovies, Jun 22, 2009 IP
  2. xheartonfire43x

    xheartonfire43x Guest

    Messages:
    16
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    there are many ways to do this.

    
    #month(timestamp)#
    
    #dateformat(timestamp,"mmmm")#
    That one will give you the month name
    
    Code (markup):
    You can also use the DatePart() function, but I can't remember the syntax off-hand. If you go onto Adobe's ColdFusion Livedocs and lookup Date Functions there are quite a few.
     
    xheartonfire43x, Jun 22, 2009 IP
    HorrorMovies likes this.
  3. HorrorMovies

    HorrorMovies Notable Member

    Messages:
    1,466
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    250
    #3
    thanks, worked perfectly.
     
    HorrorMovies, Jun 23, 2009 IP