DateFormat() -- Problem with Mask

Discussion in 'Programming' started by cwebpro, Sep 26, 2007.

  1. #1
    Hi Everyone:

    I am trying to format the date for an update page I have. (The person clicks on another page to get to my update page).

    The date info is being returned as: 2007-05-17 00:00:00.0 in the fields.

    The code is:
    <cfoutput>#Replace(WADAdboCOURSES.PRESENTATION_FILES_DATE, '"' , '&quot;', 'all')#</cfoutput>
    Code (markup):
    I was able to add DateFormat to get the date to be: 16-May-07
    Here is the code:
    #DateFormat(Replace(WADAdboCOURSES.JOB_AIDS_DATE, '"' , '&quot;', 'all'))#</cfoutput>
    Code (markup):
    I want the dateformat to be 'MM/DD/YY'. When I try to place a mask anywhere in the above statement I get an error.

    My Question: Where would I stick the DateFormat Mask in the above statement so that the DateFormat returned would be MM/DD/YY? I really appreciate your help.

    Matt

    P.S. I know the format should be without the Replace Statement: #DateFormat(Date [, Mask]) and 'MM/DD/YY' is the particular mask I want to use.
     
    cwebpro, Sep 26, 2007 IP
  2. Jamie18

    Jamie18 Peon

    Messages:
    201
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i'm assuming this is what you tried?

    #DateFormat(Replace(WADAdboCOURSES.JOB_AIDS_DATE, '"' , '&quot;', 'all')."dd/mm/yy")#
     
    Jamie18, Sep 26, 2007 IP