spicysudhi
Programmer
hi
below is my code
==================================
<%
Response.ContentType ="application/vnd.ms-excel"
set rs = Session("Conn").Execute ("Select to_char(sysdate,'DD-MM-YYYY') dt_fld from dual")
%>
<table>
<tr>
<td align=left><%=rs(0)%> </td>
</tr>
</table>
==================================
Database: oracle
the problem here i am facing is the date i am taking from the query as DD-MM-YYYY and when opened in the excel, it comes as DD/MM/YYYY or others based on locale settings. Is there a way to format while writing/converting as excel to retain the format.
i found a option to put quotes both side but that is not a good solution which could cause problems when users upload the same excel file back to my system with some amendments.
thanks in advance
sudhi
below is my code
==================================
<%
Response.ContentType ="application/vnd.ms-excel"
set rs = Session("Conn").Execute ("Select to_char(sysdate,'DD-MM-YYYY') dt_fld from dual")
%>
<table>
<tr>
<td align=left><%=rs(0)%> </td>
</tr>
</table>
==================================
Database: oracle
the problem here i am facing is the date i am taking from the query as DD-MM-YYYY and when opened in the excel, it comes as DD/MM/YYYY or others based on locale settings. Is there a way to format while writing/converting as excel to retain the format.
i found a option to put quotes both side but that is not a good solution which could cause problems when users upload the same excel file back to my system with some amendments.
thanks in advance
sudhi