Date formatting issue in Generated Excel

Hi All,
I'm generating a report by getting the values from the query and looping over it.
This is my code.
<cfheader name="Content-Disposition" value="inline; filename=testReport.csv">
        <cfcontent type="text/x-excel-csv"><cfoutput><cfloop index="i" list="#columnstrings#">"#i#",</cfloop></cfoutput>
        <cfoutput QUERY="downloadquery">#chr(13)#<cfloop index="i" list="#columnstrings#">"#replace(evaluate('#i#'),'"',"'","ALL")#",</cfloop></cfoutput>
All the columns are coming perfectly, but the date column is showing 0:00:00 in the generated excel.
The user has to do a manual formatting for the date columns.
We are using coldfusion 9 and Oracle 10G
Any help would be appreciated.
When i check the dump the query, the date columns are coming correctly.
Only the excel does not know that its a date column.

Try prepending an apostrophe.

Similar Messages

  • Date formatting issue when sending excel file via mail

    hello People ,
    I am facing date issue .
    I have inetrnal format of date as yyyymmdd.
    I am converting it into  YYYY-MM-DD.
    CONCATENATE gs_output-end_date(4)
                        gs_output-end_date+4(2)
                        gs_output-end_date+6(2)
                        INTO lv_date_to SEPARATED BY gc_seperator. " gc_separator = '-'.
            gs_output-end_date = lv_date_to.
    I am writing this date and sending an excel file via MAIL . I get date result as MM/DD/YYYY always.
    Now if i pass in YYYY.MM.DD and used the same code where gc_separtor = '.'.
    I get output as YYYY.MM.DD.
    Can any one give me an idea why in format YYYY-MM-DD it is getting overwritten but for yyyy.mm.dd it gives me as yyyy.mm.dd?
    Regards,
    Abhi..
    Edited by: Thomas Zloch on Jul 11, 2011 2:30 PM - subject enhanced

    Thanks , Rohit ,
    I have change my date format in SU01 settings .
    It is now made to [ YYYY-MM-DD] but still '-' is replaced by MM/DD/YYYY.
    Also note that when i format in the following way
       CONCATENATE gs_output-rdadate(4)
                        gs_output-rdadate+4(2)
                        gs_output-rdadate+6(2)
                        INTO lv_rda_date.
    instead of
       CONCATENATE gs_output-rdadate(4)
                        gs_output-rdadate+4(2)
                        gs_output-rdadate+6(2)
                        INTO lv_rda_date sepearted by '-'.
    I get output as YYYYMMDD.
    Regards,
    Abhishek.

  • Error 10000 Date format issue

    Hi all,
    Has anyone seen the following error please or has a troubleshooting hint: -
    "[NT AUTHORITY\SYSTEM (15/10/2012 18:35:12) - Service request cancelled due to an error.
    Error Code: 10000
    Error Description: Failed to create lease requisition.
    Fault code: soap:Server
    Fault string: Service Form Field: 'WarningDate2' has Date format issue.
    Fault details: REQ_0024Service Form Field: 'WarningDate2' has Date format issue.
    CIAC = 3.01
    Date and Time format on the CCP, CPO, vmware and SQL servers all Italian (dd/mm/yy)
    This only happens when we add a Lease Time on the request.
    Do they all have to be set to the US format for this to work?
    If this is a regional setting thing, do I have to change the format on all of the servers (CIAC components)?
    Cheers
    md

    This test program might help...
    import java.util.*;
    import java.text.*;
    public class ExpandYear
        public static void main(String[] args) throws ParseException
         SimpleDateFormat sdf_2dyear = new SimpleDateFormat("MM/dd/yy");
         SimpleDateFormat sdf_4dyear = new SimpleDateFormat("MM/dd/yyyy");
         String test1 = "3/21/00";
         System.out.println("test1: " + test1 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test1)));
         String test2 = "4/9/99";
         System.out.println("test2: " + test2 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test2)));

  • Date format issue in Excel

    Hi,
    I have a date in XML file which is in the format of YYYY-MM-DD. When i output to excel, the date needs to come as MM/DD/YYYY. I am able to format the dates as MM/DD/YYYY, but if there is a 0 in the Month or Date, it is coming as M and D instead of MM or DD.
    Eg: 2008-11-01 comes as 11/1/2008 in the excel, want it to come as 11/01/2008
    Any solution for this? I tried using subst-ringing the parts and lpad-ing with 0s, but the zeroes get stripped when you come to excel. I am not able to lpad with space, since the field is inexplicably, automatically changing to number type and gives "Cannot convert to number" error.

    Hi ,
    Its a strange requirement but still lookig for answers..
    1) Tried the User Profile and it the file is being generated in the format the use has.  However
         if we open the excel file ( Right click and say format Cells---->In this case it shows GENERAL).....The user wants the cell
         always in the date format so that can have sort and other macros...
    To Reiterate................
    1) We have to generate the Files in the date format that the user profiel has and also the excel file should show the date cells in date format but not general....

  • EXCEL FOR MAC 2011 Date Format Issue

    Excel for Mac 2011 14.1.0  on iMac OSX 10.7.5.  I see no forum category for Microsoft Office for Mac so just chose iMac. Checked Microsoft site first with no success.
    PROBLEM:
    In new spreadsheet I selected one column and formatted to date format. 
    It was working fine.  Then after I'd been doing some editing and having issues, I closed the file then opened it again.
    The cells/column I'd formatted for dates was showing the date as strange numbers.  Like this:  Instead of 9/12 it shows 41894.
    Even though the individual as well as column cell format is still  "Date" with example style of "3/14" selected, it will not work.
    I cannot find a way to "Clear Formatting" either -- only Clear Contents.
    However, when I cut and paste the cells to another worksheet the date is fine -- but I've lost all my formatting and don't want to start over.  Besides, I need to know what is causing the problem.
    HELP!!  Is this a bug?

    Granny,
    You will probably find help on the Microsoft Office website. Excel isn't covered here.
    Jerry

  • Excel import to numbers- date format issue?

    importing excel to numbers means my date format goes to a 5-digit number. I've ensured that the Excel cells are correctly formatted as dates but it keeps happening. Any ideas?

    see the reply by BadUnit at the bottom of this thread:
    https://discussions.apple.com/message/24099788#24099788

  • Date formating issue

    Hi All,
    I am receiving the Begin Date and End date from one of the RFCs and then using these dates for the import parameters of another RFC.
    But the second RFC receives the dates either in YYYYMMDD or DD.MM.YYYY format.
    The BeginDate and EndDate of the first RFC are binded to two input fileds so they appear as Date pickers in the runtime.
    As I select the date range , I need to execute the second RFC before submition and so the Import of the Second RFC should receive the date range .
    I have gone through many Forum threads but the way they are suggesting, returns me no right result. If I follow the Simple date Format, I parse the date and have a String output which the second RFC does not accept.
    And if I assign the parsed value to the a Date type then I receive a null value for the same. I need your help , please suggest and guide.
    Regards
    DK

    Hi Mohanthy,
    As you told, BeginDate and EndDate of the first RFC are binded to two input fileds and the values of BeginDate and EndDate has to be sent as input fields to another RFC.
    Just get the values from the node generated by first rfc and set them to the i/p node of second rfc.
    Date Format should not be  a issue in this case and for your information the date which is used by RFC is Java.SQL.DATE Class.
    Regards,
    Kiran Kumar

  • Date format issue in oracle database

    Hi,
    Back end : Oracle 11.2.0.2.0
    Front end : Forms 11g
    In our application we are facing issue with TO_DATE('DD/MM/YYY') Date format conversion.
    Example: TO_DATE(P_date,'DD/MM/YYYY') giving the result as 20-Dec-0009
    In the above eg the Parameter P_date is coming as '20-dec-09' from the front end (forms 11g)
    The Nls_date_format parameter at database level is set as 'DD-MON-RR'
    Its working fine after changing the conversion as TO_DATE(P_date,'DD/MM/RRRR') .- If we do like this , we need to change in many places , so instead of doing this, is there other solution wrt database settings/Application settings where we can change and fix this issue
    pls help us to solve the issue.
    Regards.
    sathish k

    892913 wrote:
    Hi,
    Back end : Oracle 11.2.0.2.0
    Front end : Forms 11g
    In our application we are facing issue with TO_DATE('DD/MM/YYY') Date format conversion.
    Example: TO_DATE(P_date,'DD/MM/YYYY') giving the result as 20-Dec-0009
    In the above eg the Parameter P_date is coming as '20-dec-09' from the front end (forms 11g)
    The Nls_date_format parameter at database level is set as 'DD-MON-RR'
    Its working fine after changing the conversion as TO_DATE(P_date,'DD/MM/RRRR') .- If we do like this , we need to change in many places , so instead of doing this, is there other solution wrt database settings/Application settings where we can change and fix this issue
    pls help us to solve the issue.
    Regards.
    sathish kWell the solution is right in front of you. As you say, your database environment is set to DD-MON-RR so your database is set to use 2 digit years (something most people moved away from with the millenium bug more than 10 years ago now). You can either change all your code to use RRRR as you've found, or change your database NLS setting to DD-MON-RRRR and change your front end application to pass you a date with 4 digit years so you get e.g. '20-dec-2009'.
    So many people worked hard to resolve the millenium bug issues all those years ago, but still we have people, all these years later, who want to reintroduce the problem. So sad.

  • Date Format Issue IN BEX REPORT

    Hi Experts,
    we are working on BW 3.5.
    we have a ODS where data is uploaded through flat file and there are 5 to 7 date field all made of Z infoobjects.
    So now the user is putting the data for these Date fields as 20110901 = 1st sep2011. but in report its coming as 09/01/2011
    when i checked all the Z fields that are created for this date fields have reference character as Date
    only one field is character so it is coming correct as given by the user
    but rest all are appearing in different format . In ODS also the date is coming as 09/01/2011
    now the user want all the data to be in the same format as given by HIM.
    I cant even change the properties of these Z info object removing the reference info object 0Date and make them character string.
    so now please suggest how to upload the date given by the user as it is without changing the format and also how to change the format for the back data as its flat file so No data can be deleted.
    thankkkkkkkks

    hello
    Bex analyzer is an excel add-in. Date formats are based on your regional settings.
    If you want to have a different date format in the sap gui then you have to change your user profile in sap system.
    Flat file upload needs the date format in a database format (YYYYMMDD).
    You can transform the date in the transformation step with rules or with a routine( abap coding).
    Thank you
    Yiannis

  • Date format issue in Web Analysis...

    Hi,
    I am creating a report by connecting to a couple of relational tables. I'm using SQL Spreadsheet and SQL Subscription objects. I'm creating a Date filter using SQL Subscription object (list box) using the data source created by the SQL Spreadsheet. My database default date format is 'DD-MON-YYYY'. But in the list box it shows as 'YYYY-MM-DD HH24:MI:SI". When this value is selected, I get a "Literal mismatch error" since it doesn't match with the value stored in the database.
    Why the format in WA is showing in this format even though it is fetchting it from my database in which the format is 'DD-MON-YYYY'. Is this related to WA date format settings? I cannot find anywhere in WA studio where I can set date formats. Is this something to be set in the server or webanalysis.properties file?
    PS: I tried to work around this by storing the date value as character in the database but then I am not able to sort them ascending or descending order.I also tried creating the web analysis relational database connection which creates a virtual cube. But even there when I build the report using Data Source Navigator, it is showing date in 'YYYY-MM-DD HH24:MI:SI'.
    H

    Hi,
    Let me provide you the details of the report.
    A concurrent program has been created with executable as XDODTEXE (XML publisher report).
    In the data definition, we have embed one query which fetches transaction date and due date from some tables based on some conditions.
    Now, we have to show these date columns in report output which will be in EXCEL format.
    We want these date outputs to be printed in dd/mm/yyyy format. That is the reason we had given-
    TO_CHAR(TO_DATE (SUBSTR(transaction_date,1,10), 'DD/MON/RRRR'),'DD/MM/RRRR') in the SQL query.
    Problem in output is- In date columns, data after 12th is fine i.e. in format dd/mm/yyyy, it is printing properly.
    But before 12th, it is printing in format mm/dd/yyyy as mentioned below-
    01/10/2012--wrong format, it should be 10/01/2012
    01/11/2012--wrong format, it should be 11/01/2012
    01/12/2012--wrong format, it should be 12/01/2012
    13/01/2012--correct format (dd/mm/yyyy)
    14/01/2012--correct format (dd/mm/yyyy)
    How can i send you the attachment, is there any way/any email id?
    Rgds-
    Sumir

  • Prblm in Date format when exported to excel

    Hi ,
    I had a problem when using the Export To Excel option from Portal. The data is getting fine populated in Excel but it's in General No Specific Format. But I wanted the data to be in its original format even when exported to Excel. Like...
    Country -
    Date Goods Delivered
    India----
    01.01.2001
    America----
    05.12.2004
    Singapore----
    12.04.2003
    Here the country should be of type TEXT FORMAT and Date Goods Delivered should be in DATE FORMAT(Here its visible as date but it's in General format)
    I am facing problem with date, it is displayed(01.04.2006) as shown above but it's in general format. I wanted it to be in date format at excel.
    I am in BW3.5 with portal version EP7.0
    Please suggest the solution and I had even gone through previous forum questions related to this but couldn't get.....the solution.
    points will be assigned...
    Regards,
    rudra.

    Hi,
    My end users requirement is to get all data in Standard format. We can't ask to select the date column and change the format in excel as there are more date fields(columns ).
    Using macro i had one problem,even though i am not sure..
    i can't enable the macro to get enabled in page load of export to excel as it is to be done at users end...
    If theres any possibilty of enabling....pls let me know
    Thanks for your valuable suggestions...
    Regards,
    rudra.

  • Uk date format issue with ASP and Access Database

    I have an Asp form which updates records in an Access
    database. Problem is
    that the date format in the database record is dd/mm/yyyy
    (UK), when
    the record is displayed on the form it is mm/dd/yyyy(US)
    which after I
    update the record in the database the date has changed to the
    new format.
    I have tried everything I can to change the format but to no
    avail...anyone any ideas how I can resolve this issue?
    Thanks
    Steve

    stevo.s wrote:
    > Hi
    >
    > I have tried changing the format on the date field on
    the server behaviours
    > panelto ddmmyyy. Also have tried to set the form field
    format to ddmmyy. I have
    > also tried to use a function I got from a posting
    somehwere on the net to no
    > avail. <%function ddmmyyyy(varDate)
    > ddmmyyyy = Day(DateValue(varDate)) & "/" &
    Month(DateValue(varDate))
    > & "/" & Year(DateValue(varDate))
    > end function
    >
    > I believe that this is a recognised issue with
    Dreamweaver and Access but
    > can't seem to grasp the work around! Problem being I am
    teaching myself through
    > books and internet articles and can be weeks at a time
    without being able to
    > look at the issue..each time I come back to it it is
    like starting all over
    > again! I was hoping that somewhere out there there is a
    simple solution the
    > issue perhaps a date picker with the built in
    functionality to address the
    > issue...I am keen to understand how to deal with the
    issue rather than just
    > change my database date field to fudge the problem as I
    am in the UK and when I
    > eventually start to use the application I would like
    there to be some
    > consistency with dates and that users are familiar with
    the format.
    >
    > Any help gratefully received!
    Its not Dreamweaver, or Access, its your servers locale, its
    set to US
    format, not the UK.
    On your page at the top use:
    <% Session.LCID = 2057 %>
    This will force the page into using UK formatted dates. Use
    it on any
    page that needs to format the page correctly.
    Dooza
    Posting Guidelines
    http://www.adobe.com/support/forums/guidelines.html
    How To Ask Smart Questions
    http://www.catb.org/esr/faqs/smart-questions.html

  • Date Format Issue with Interactive Form

    Hi, here is the scenario:
    -We just upgraded to SP17 from SP15
    -I'm using Livecycle Designer 8.0
    When we were on SP15, this was not an issue.  I was wondering if anyone encountered this problem and if so, if there is a workaround?
    I create an interactive form to start a guided procedure process.  Im passing the data from my desktop Interactive form to another callable object in GP to send an email with the PDF attached.  This all works correclty. 
    My date/time fields are set to type DATE with a display pattern of YYYY-MM-DD.  When I create the form in the GP administrator to my desktop and open the PDF, the date format is correct. However, when I submit the form to start the process, the incomming date fields to be mapped to my second Callable Object have change in format from "2009-02-18" to  "Wed Feb 18 00:00:00 EST 2009".
    This is true in the new form I receive via email, and also in NWA->monitoring->guided procedures when I check the instances.  The input mapping is already set to the false formatting.
    When I open the form from the second callable object with the incorrect date format (in designer), the date's display patterns are set to YYYY-MM-DD but are not being displayed as such.
    New discovery....I tried to create a Business Logic callable object and format the date.  I created a string input and date output and mapped them accordingly.  When I perform a "TEST" from the design time and use the input "Wed Feb 18 00:00:00 EST 2009", the string is automatically converted to 18/02/2009 in the output, which is what I want to occur.  The only problem is when I run the actual process, the same "Wed Feb 18 00:00:00 EST 2009" is being output instead of the 18/02/2009 in the TEST.
    Anyone have any ideas?
    Thanks.
    Edited by: Warren Clements on Feb 26, 2009 2:20 AM

    This test program might help...
    import java.util.*;
    import java.text.*;
    public class ExpandYear
        public static void main(String[] args) throws ParseException
         SimpleDateFormat sdf_2dyear = new SimpleDateFormat("MM/dd/yy");
         SimpleDateFormat sdf_4dyear = new SimpleDateFormat("MM/dd/yyyy");
         String test1 = "3/21/00";
         System.out.println("test1: " + test1 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test1)));
         String test2 = "4/9/99";
         System.out.println("test2: " + test2 + " to : " +
                      sdf_4dyear.format(sdf_2dyear.parse(test2)));

  • Date Format issue while Connecting to Oracle8i and Oracle10g

    Hi All,
    While playing around with JDBC drivers, I came across this weird issue. I have a Local machine with Japanese Locale and I have 2 Database Servers that too with Japanese Locales and Oracle 8i and Oracle 10g each. Now, I connect to these database using JDBC drivers for 8i and perform "select sysdate from dual". Then, m getting dates with 2 different format. While 8i being returning Date with 'DD-MON-RRRR' format, 10g returns date with 'DD-MM_RR' format.
    Initially I thought it might be because of some VM Locale thing but when I connected to 10g DB from 8i Oracle client, this behaviour did not changed. Which mean in this case also the date format returned ny the query was different.
    Guys F1! F1! (Help! Help!) Appreciate your help to understand this process. Links and suggestions welcome... :)

    I guess u did not read the whole content. I mentioned this but the difference in behaviour with respect to JDBC drivers made me post this in Java forum.
    As I mentioned, it has something to do with the jdbc driver or oracle server itself. Agreed, but what that "something little to do" is the maiin question.
    I mentioned that I want to understand this process about how JDBC driver works with Client VM specific Locale settings while interacting with Oracle Database.
    Don't you think it could be interesting to know, what it is which brings this difference in results. Its all about clarifying the small bits & pieces which stays unanswered if one overlooks. Its own perception, I felt like asking question, no offense right!

  • Date Format issue in my report.

    Hello Experts-
    I created a report with a date prompt, which we need to enter two dates, start date and end date.
    I followed the steps as they were in this link
    http://obiee101.blogspot.com/2009/03/obiee-between-dates-prompt.html
    I changed the condition in the prompt to Date'1900-1-1' instead of TIMESTAMP'1900-1-1- 00:00:00
    I.e.,
    CASE WHEN 1=0 THEN CALENDAR.D_DATE ELSE Date' 1900-01-01' END
    and
    CASE WHEN 1=0 THEN CALENDAR.D_DATE ELSE Date '2999-12-31' END
    I stored those two dates in two presentation variables start_date, end_date
    In my report, I imposed a filter on my table that, date coulmn in my table is between Date'@(start_date}' and Date'@{end_date}'
    But when I am running the report with entering two dates, I am getting this error:
    *State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46046] Datetime value 12/1/2010 does not match the specified format. (HY000)*
    I entered 12/01/2010 as start date and 12/02/2010 as end_date
    Can you please guide me in this issue.

    I think your date format is in different format with the date format u stored in presentation variable so better check the date format of the case function u wrote it in you variable that will solve the problem.

Maybe you are looking for

  • ITunes could not copy ''file'' because the file could not be written

    Recently, I have been experiencing some problems with iTunes and my iPad 2. Whenever I try to sync movies into my iPad, I get the error message ''iTunes could not copy ''file'' because the file could not be written''. This message always appears when

  • Query Conversion

    Hi, I am new in oracle. I have one BI query as follows: case when TimestampDiff(SQL_TSI_DAY, Dim_W_SRVREQ_D.OPEN_DT, ifnull(Dim_W_SRVREQ_D.CLOSE_DT , TIMESTAMP '2009-06-08 00:00:00.000')) <= 5 then 'A: <= 5' when TimestampDiff(SQL_TSI_DAY, Dim_W_SRVR

  • Error ODCIindexstart() routine when doing a text query

    Platform 8.1.5 Linux RH6.0 all applicable Ora and RPM patches applied. I created 2 indexes 1 small 150k records 1k per document the other larger 350k records 30k documents. I have no probllm indexing either text table, and I have no problem querying

  • ECC 6.0 System messages for purchasing transaction code needed

    I am looking for the txn code for purchasing messages; I am looking to change one from Error to Warning. Thanks, Michelle

  • Working off 3 junction tables...

    Greetings: My 3 dimensional skills are taxed with this query. I have 3 junction M2M tables- Bid to Code: junction_ID bid_ID cccode_ID Vendor to Code: ccjunction_ID cccategory_ID vendor_ID Vendor to bid (not used in this query) and one contact table,