We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

mm/dd/yyyy

Thread ID:

Created:

Updated:

Platform:

Replies:

24972 Feb 15,2005 01:15 PM Feb 24,2005 07:17 AM Windows Forms 1
loading
Tags: XlsIO
Shannon Broskie
Asked On February 15, 2005 01:15 PM

3.0.1.0 When trying to apply a NumberFormat of "mm/dd/yyyy", I only get "m/d/yyyy" when viewing in Excel. Here''s the code: for ( int i = 0; i < reportData.Count; i++ ) { mySheet.Range[ currentRow, 1 ].Text = reportData[ i ][ "Portfolio" ].ToString(); if ( reportData[ i ][ "TradeDate" ] != DBNull.Value ) mySheet.Range[ currentRow, 2 ].DateTime = Convert.ToDateTime( reportData[ i ][ "TradeDate" ] ); mySheet.Range[ currentRow, 2 ].NumberFormat = "mm/dd/yyyy"; currentRow++; } Any issue with this in version 3.0.1.0? Thanks!

Administrator [Syncfusion]
Replied On February 24, 2005 07:17 AM

Hi Shannon, Could you please try using this number format mySheet.Range[ "j1" ].NumberFormat = "mm/dd/yyyy;@"; This is a format that MS Excel uses to represent mm/dd/yyyy format Please let me know if you have any questions. Thanks, Stephen. >3.0.1.0 > >When trying to apply a NumberFormat of "mm/dd/yyyy", I only get "m/d/yyyy" when viewing in Excel. > >Here''s the code: > > for ( int i = 0; i < reportData.Count; i++ ) > { > mySheet.Range[ currentRow, 1 ].Text = reportData[ i ][ "Portfolio" ].ToString(); > if ( reportData[ i ][ "TradeDate" ] != DBNull.Value ) > mySheet.Range[ currentRow, 2 ].DateTime = Convert.ToDateTime( reportData[ i ][ "TradeDate" ] ); > mySheet.Range[ currentRow, 2 ].NumberFormat = "mm/dd/yyyy"; > > currentRow++; > } > >Any issue with this in version 3.0.1.0? > >Thanks!

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;