Formatting a date variable

I want to format the value of date which is in a variable(date_var) in MM-DD-YYYY format and print it in a document.
                     <td>
                         #DateFormat(#date_var#, 'MMMM DD,YYYY')# does not work
                     </td>
does not work.
How can I do that?

Plz try this...
<cfset 
date_var = now()>
<cfset t =DateFormat(date_var, 'MMMM DD,YYYY')>
<cfdump 
var="#t#">
<cfdocument 
filename="d:\testdate.pdf" overwrite="yes" format="PDF">
<cfoutput>#t#</cfoutput></cfdocument>

Similar Messages

  • How do i change the $Date variable format on an Ironport ESA to be DD/MM/YYYY

    I have an Ironport ESA running ASyncOS 7.6 and i use the $Date variable in notification emails.  It is currently formatted in the US way of MM/DD/YYYY but we need it to be formatted as DD/MM/YYYY.  Is there any way to do this?  The time zone is correct but i can't find anywhere to modify system variables.

    There doesn't appear to be any way to change the formatting of that variable.  Perhaps you can make use of $Timestamp or $GMTimeStamp instead?

  • How to change date format for prentation variable in Formula

    Hi experts.._
    I need to change date format for presentation variable in formula..
    my dashbord date prompt format: mm/dd/yyyy(i have created one presentation variable for this prompt: pv_date)
    now i need to show it as : month-dd-yyyy
    Thanks in advance
    Regards
    Frnds

    Hi Kishor...Thanks for reply...
    But i need to change my precentation variable date formt...
    i need to write one text like: 'Year to dd/month/yy' in one column formula..
    So how can i achieve it..

  • Adding 3 weeks to a Date variable

    Hi,
    In order to levy a fine,it must be calculated,
    it therefore makes sense for the system to check for overdue books.
    in order to use
    if Date.after(dob)=true{
    FINE$
    I must add 3 weeks to the date variable "dob" (date_of_borrow,stored on a database in dd-mm-yy format)
    How do i do it?
    The only other alternatives i have are Calander or milisec-day conversions.I'm unsure on using GregorianCalander & people have advised against milisec.
    (you can see why, in the forum post "Urgent:Html & Servlet").
    Anyway i hope this will work.
    Suggestions anyone?Thanks.
    Aesh83

    is it as easy as saying .getWeek()?Must i set the system date on it or is it anyway default?-
    Here is a something i cooked up ,in a hurry, (HELP!!: How do u use sdk with Kawa editor) ,i'm working in the dark hoping i can find the light..
    Ah here it is-
    int dob2;
    //it suposed to trigger whenever user opens borrow.htm//
    date.format(dd-mm-yy);
    dob.format(dd-mm-yy);
    rs=stmt.excecuteQuery("Select dob from LENT where UserN==User_N");
    LOOP
    getdata into a resultVector
    dob.elementAt(i);
    if Date.after(dob)=true{
    FINE$
    LOOP
    What do u think?Needs improvemnts.
    How do you get System date onto a Date variable?
    Will date.after(Date when) method work when Date variables are in milisecs?
    Thanks & Bye!
    aesh83

  • Date variable in a query

    Hi all,
    Currently I'm working on a query and I'd like to put in a date variable. It has to be a monthly report and I'm building the query for it based on the attribute "TaxDate" (with format DD-MM-YY) from the table "ORDR".
    For the query I'd like to build in a variable where the user can put in the month and year, for instance 01-04. I know how to put in a variable, but how can i solve this problem?
    I thank you in advance!
    Edited by: Chief on Mar 12, 2008 1:23 PM

    Chief,
    The parameters in a SQL Query accepting a date works the same way as you would enter a date on DocDate or DocDueDate field on the form.
    But, you will need to filter the input and take only the Month.
    So test this simple query
    SELECT T0.DocNum AS 'Document Number', T0.DocDate AS 'Posting Date' FROM  [dbo\].[ORDR\] T0  WHERE MONTH(T0.TaxDate) = MONTH('[%0\]')
    Suda

  • Formatting a date in XSLT

    I am working with an XSLT fragment in dreamweaver and all
    seems to be working fine except when it comes to the date field in
    the XML it is transforming. It looks like dreamweaver has no
    options in it for formatting a date. Looking on the web it appears
    that XSLT doesn't have a function for that except if you are
    running XSLT 2.0??
    my XML looks like
    <pubDate>Wed, 04 Apr 2007 04:00:00
    +0100</pubDate>
    Can anyone help me just show only this part, "Wed, 04 Apr
    2007"
    thanks
    chris

    >I am working with an XSLT fragment in dreamweaver and all
    seems to be
    >working
    > fine except when it comes to the date field in the XML
    it is transforming.
    > It
    > looks like dreamweaver has no options in it for
    formatting a date. Looking
    > on
    > the web it appears that XSLT doesn't have a function for
    that except if
    > you are
    > running XSLT 2.0??
    Correct.
    > my XML looks like
    > <pubDate>Wed, 04 Apr 2007 04:00:00
    +0100</pubDate>
    > Can anyone help me just show only this part, "Wed, 04
    Apr 2007"
    With XSLT, this should work:
    <xsl:value-of select="substring(pubDate,1,16)"
    order="descending" />
    The substring function variables are:
    substring(node, postition of start character in string, total
    number of
    characters to include)
    It's akin to a TRIM string statement in server-side
    programming languages.
    -Darrel

  • Error with Date Variable

    I am trying to create a process to import to import data using a date variable but when I use the date to get the data from SQL server I am getting a error.
    I have tried setting the variable as both a string and date - Select
    CONVERT(varchar(10), DATEADD(day, -1, GETDATE()), 101) and map it to the Variable. The date variable is working. It’s correct in the Watch and I am able to use the variable to get data from an Open Link database (row_date = ?)
    in the OLE DB Source query. I get a "Invalid character value for cast specification"
    error when doing the same thing to get data from an SQL Server OLE DB Source
    where the date field is DateTime (row_date = ?). I have tried making the variable as a date and string but get the same error regardless. To make it work, I have to duplicate the date
    calculation in the query - HAVING (row_date = CONVERT(varchar(10), DATEADD(day, -1, GETDATE()), 101) ) which works fine.
    HAVING (row_date = ?) gives the error with the Parameter mapped to the variable.
    Any suggestions as to how to make this work correctly?

    May I suggest to use style 111 instead of 101?
    From experience, yyyy/mm/dd date format will work most of the time for date conversion and
    It's due to different date format from mm/dd/yyyy to the system date format that SQL Server is using.
    Hope this helps.
    ~ J.

  • Formatting the date in a report

    I have a report in which i have the date at the top left. This is currently displayed as:
    Wed Oct 05
    But I would like it to be in the following format:
    October 5th, 2005
    Any ideas?

    create a Formula Column as Character datatype with appropriate length/width. Then in the PL/SQL section of that formula column write:
    V_formatted_date  varchar2(25);
    BEGIN
    v_formatted_date := (select trim(to_char(sysdate,'Month'))||' '||ltrim(lower(to_char(sysdate,'ddth')),0)||
    trim(to_char(sysdate,', YYYY')) from dual);
    RETURN(v_formatted_date);
    END;And use this formula column as a source for the field in the layout where you want to show that formatted date.
    P.S. In the example I used sysdate, use your original date variable instead.
    Thanks.

  • Problem with Date Variable (Resolved)

    Hi,
    I am using a varibale of type date to populate a constant date value to my target column. My source is excel and target is Oracle.
    When i execute, it shows the following error - 'Unexpected token: 00 in statement'
    I also tried to give an sql qurey for the variable as 'select sysdate from dual'. It's of no use.
    Can anyone help me out in this?
    Thanks in Advance,
    Ram Mohan T
    I used the target execution instead of Staging Area. It worked fine.
    Edited by: T. Ram Mohan on Aug 30, 2008 9:37 AM

    Hi Jordan,
    I would suggest several options.
    First, you have the option within Webi to display only the date and not the time (right click on the object on the report, or go to field properties, and change the format of the display).
    If you are using this value in comparisons in the report, you must make sure the format matches. Try changing the format within the variable to be the same as what you are comparing it to. If that is still not working, let me know. It may still just be a syntax or data type/format error.
    Thanks

  • APD with date variable in filter object

    Have an APD with a filter object. The filter uses a range for 0CALDAY. the range includes a variable (customer_exit) whic calculates the date of previous fiscal period-end date. Works perfectly in Bex.
    However, when running the APD, the date format comes out as YYYY/MM/DD, and 0CALDAY is expecting MM/DD/YYYY.
    How can I get the internal format of the date correct? I get no errors in the APD, however the date format causes incorrect results, as if no date was entered.
    Any suggestions?
    PS. actually, the internal date format used by the APD for my variable ZCE_PREVPER_END is:
    ZCE_PREVPER_END  = '20101001'
    Needs to be 10/01/2010....
    Edited by: JoeC on Oct 27, 2010 11:39 PM

    Hi Jordan,
    I would suggest several options.
    First, you have the option within Webi to display only the date and not the time (right click on the object on the report, or go to field properties, and change the format of the display).
    If you are using this value in comparisons in the report, you must make sure the format matches. Try changing the format within the variable to be the same as what you are comparing it to. If that is still not working, let me know. It may still just be a syntax or data type/format error.
    Thanks

  • Problem with Date Variable in Web I

    Hi everybody,
    In the BW I have a query with a Date Variable (0date) and when i execute the WebI report the variable
    shows date and time, like "04/22/2010 00:00:00". Is it possible i remove the
    time from the variable ?
    I need to do this cause i use this date to make some calculation into the WebI report, and with the time the formulas don´t work fine, it shows "#ERRO". I've already tried to insulate the date in other variable using some functions, but it does´t work nevertheless.
    Any idea ?
    Thanks.

    Hi Jordan,
    I would suggest several options.
    First, you have the option within Webi to display only the date and not the time (right click on the object on the report, or go to field properties, and change the format of the display).
    If you are using this value in comparisons in the report, you must make sure the format matches. Try changing the format within the variable to be the same as what you are comparing it to. If that is still not working, let me know. It may still just be a syntax or data type/format error.
    Thanks

  • Want to use presentation date variable in Advance SQL filter option

    Hi,
    I want to use presentation date variable in Advance SQL filter option.....I am getting the below error.
    SQL in Advance SQL filter ----
    "Fact Status Details"."Load Date" =
    (select min(Cast("D Time"."Business Date" as char))-1
    from "D Time" where "D Time"."Operational Month Sk" =
    (select "D Time"."Operational Month Sk" from "D Time" where date '@{Date1}'=cast("D Time"."Business Date" As char)))
    Error ---
    Error getting drill information: SELECT "Fact Status Details"."Load Date" saw_0 FROM "Pre RFAI Sales" WHERE "Fact Status Details"."Load Date" = (select min(Cast("D Time"."Business Date" as char))-1 from "D Time" where "D Time"."Operational Month Sk" = (select "D Time"."Operational Month Sk" from "D Time" where date '@{Date1}'=cast("D Time"."Business Date" As char)))
    Error Details
    Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <select>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: {call NQSGetLevelDrillability('SELECT "Fact Status Details"."Load Date" saw_0 FROM "Pre RFAI Sales" WHERE "Fact Status Details"."Load Date" = (select min(Cast("D Time"."Business Date" as char))-1 from "D Time" where "D Time"."Operational Month Sk" = (select "D Time"."Operational Month Sk" from "D Time" where date ''@{Date1}''=cast("D Time"."Business Date" As char)))')}
    Load Date format ---YYYYMMDD
    Please advise...i need to fix this issue urgently.

    Thanks for your reply.
    Could you please help me with the correct code...i tried to correct it....
    "Fact Status Details"."Load Date" =
    (select Cast(min("D Time"."Business Date" )-1 as char)
    from "D Time" where "D Time"."Operational Month Sk" =
    (select "D Time"."Operational Month Sk" from "D Time" where Date'@{Date1}'=cast("D Time"."Business Date" As char)))
    Please let me know if i am wrong..this code is also not working.

  • Formula date variable ,which is processing by 'Customer exit' with ready in

    Hi ,
    I need to create 1 variable which takes date from user and do some calculation.irrespective of any date char.
    so I have created Formula date variable ,which is processing by 'Customer exit' with ready input .
    But when selection screen pop up date formula variable comes with the format yyyymmdd.
    but i need dd.mm.yyyy. i have checked my profile and it is dd.mm.yyyy.
    Waitin for reply

    Hi Babu
    Did you get the answer to the query....if yes please drop me a mail on this as I have the same requirement and thanks in advance...
    my id   [email protected]
    REgards
    Amit

  • How to make a data variable BOLD

    Hi,
    I am passing a value to a data variable. Now this value being passed needs to be in BOLD format.How can i ensure this using Abap statements. ?
    Note : This value, i am displaying in an ALV.But the problem here is not all the values have to BOLD,there is a condition attached to it.So i guess i cannot make use of ALV features.Am i correct ?
    Please Guide me !!!
    <REMOVED BY MODERATOR>
    Regards,
    Rohan
    Edited by: Alvaro Tejada Galindo on Jan 23, 2008 12:27 PM

    Hi,
      You can not make a variable as BOLD, but you can display the variable in different color that can be possible in alv, i can suggest you to do this.
    Rgds,
    Bujji

  • Change Display Format of Date Field

    Hi,
    How can I change the display format of a date?
    When the field is displayed as a DateField the data format is good, but can I change the format? The problem with a DateField is also that the field can be updated and that shouldn't be possible.
    When the field is displayed as a DisplayField the format looks worse. It looks like it's doing a toString from a Data variable.
    Could someone tell me what is the best way to Display a Date from the database? The users shouldn't be allowed to change the value.
    Thanx

    Use something like this:
    <messageDateField name="Birthdate" promptAndAccessKey="Birthdate" data:text="Birthdate" anchor="Birthdate" persistent="true" dataObject="uNextMonthsBirthdaysSet" data:value="Birthdate" data:readOnly="isViewing">
      <onSubmitValidater>
        <date dateStyle="shortish"/>
      </onSubmitValidater>
    </messageDateField>

Maybe you are looking for

  • Dynamic Credit Limit check not giving error message

    Hi! I have configured the credit management like below: 1. high risk, medium risk, low risk category. 2. credit control area with update : 00000012 3. In pricin procedure for net value, routine "A" is given. 4. In Item Category, Credit Active tick ma

  • BI content configuration problem

    I'm working on a new installation of our development BI, and I'm trying to complete the configuration.  I have the RFC connections working, and did the replication between our ECC 6 system and the BI system.  However, when I look at our Infoproviders

  • Need help with installing Adobe Flash Player

    I saw a message that my Flash player was out of date. I tried to install it, but whenever I opened the downloaded installer, it crashed. I have uninstalled Flash, made sure there was no Flash plug-in in my Library for Internet plug-ins, re-started my

  • Purchse Register & sales register

    Hi, Dose anybody had developed a report for Purchase register & Sales register which includes the Excise as well as VAT values in it. I want the dump of the program as I am running very much short of time.. Kindly help. Regards

  • Adding maps to existing contacts

    Hi can only see a way to add maps to new contacts.  What about existing ones?