ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date Formatting Problem (https://www.excelbanter.com/excel-programming/305931-date-formatting-problem.html)

Mehdi Shoja

Date Formatting Problem
 
Hi, the date 01-Jan-1900 and 01-Jan-2000 both are
displayed as 01-Jan-00 by Excel when downloading a ASP
page business report (by programming it) into Excel.
Apparaently, the Excel makes the final decision by
reformatting the specified and inserted date 01-Jan-1900
and displaying it as 01-Jan-00 causing confusion with 01-
Jan-2000 which again the Excel would display as 01-Jan-00.

I must say that the data passed into Excel is correct but
the displayed format is driven by Excel.

has anybody got any suggestion os solution to this
problem? Please let me know if you need more explanation.

Frank Kabel

Date Formatting Problem
 
Hi
why not format the cell/column with a different date
format. e.g.
DD-MMM-YYYY

-----Original Message-----
Hi, the date 01-Jan-1900 and 01-Jan-2000 both are
displayed as 01-Jan-00 by Excel when downloading a ASP
page business report (by programming it) into Excel.
Apparaently, the Excel makes the final decision by
reformatting the specified and inserted date 01-Jan-1900
and displaying it as 01-Jan-00 causing confusion with 01-
Jan-2000 which again the Excel would display as 01-Jan-00.

I must say that the data passed into Excel is correct but
the displayed format is driven by Excel.

has anybody got any suggestion os solution to this
problem? Please let me know if you need more explanation.
.


Mehdi Shoja

Date Formatting Problem
 
Thanks for the reply. I am not too sure how to format
the cell/column from within the ASP page?

I write the code in ASP page and build the excel report
using Stream object as follows:

With vStream
.WriteText "<HTML", C_adWriteChar
.WriteText "<BODY", C_adWriteChar
.WriteText "<TABLE border=1", C_adWriteChar


All times are GMT +1. The time now is 12:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com