Hi to everyone.

I have created jsp report in that date column is there where am showing the date format like this (02-01-2012)

<% String Rcheckdate="";

SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy");

Rcheckdate=df.format(rs.getDate("tr_dt")); %>

<td align='center'><%=Rcheckdate%></td>

In report i have given the excel button from there am exporting the data to excel sheet.. but while am exporting the data to excel sheet the date format is changing... where two format is showing in sheet

02/01/2012
and
02-01-2012 (I want in this format in whole sheet not above)

Can anyone suggest me why its changing.

Thanks in advance.
Abrar.

Recommended Answers

All 2 Replies

You failed to mentioned what does the "Excel button" execute to produce these excel reports? Are you using Jasper reports (if so then you have some configuration issues) if you produce reports manually then there is issue with your coding. Without more info nobody will able to help you.

Thanks for your reply...

I am not using jasper report.

Am just exporting the data to excel sheet

function fun(){

document.led.printval.value=0;
document.led.val.value=1;
document.led.action="/ryk/jsp/report.jsp"
document.led.submit();
}

by using the javascripti function. The output on the webpage is coming perfectly but not in excel sheet.

using form also...

    <form name=led method=post>
        <input type=hidden name=val>
        <input type=hidden name=printval>
        </form>

hope this will help.

Thanks,
Abrar.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.