Date to DateStamp?

Discussion in 'Programming' started by amaze, Aug 29, 2007.

  1. #1
    Hi,

    I have a date in the following format: 2007/08/30.

    How can I then convert into "timestamp" format (like below)?

    {ts '2007-08-30 00:00:00'}

    Thanks
     
    amaze, Aug 29, 2007 IP
  2. cfStarlight

    cfStarlight Peon

    Messages:
    398
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    One way

    
    <cfset arr = listToArray("2007/08/30", "/")>
    <cfset newDate = createDate(arr[1], arr[2], arr[3])>
    <cfdump var="#newDate#">
    
    Code (markup):
     
    cfStarlight, Aug 29, 2007 IP
  3. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Nice thanks!
     
    amaze, Aug 29, 2007 IP