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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

mm/dd/yyyy

Thread ID:

Created:

Updated:

Platform:

Replies:

24972 Feb 15,2005 06:15 PM UTC Feb 24,2005 12:17 PM UTC WinForms 1
loading
Tags: XlsIO
Shannon Broskie
Asked On February 15, 2005 06:15 PM UTC

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 12:17 PM UTC

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon

;