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.

Setting and existing Colum as a date

Thread ID:

Created:

Updated:

Platform:

Replies:

106538 Jan 13,2013 02:38 PM Jan 16,2013 06:04 AM ASP.NET Web Forms (Classic) 2
loading
Tags: XlsIO
Gordon Hooton
Asked On January 13, 2013 02:38 PM

Have tried a number of ways to set a existing column of dates i.e "24/3/2012" "dd/mm/yyyy" from text to date format.
Tried code such as

matchedsheet.Columns[0].CellStyle.NumberFormat = "dd/mm/yyyy hh:mm:ss";  and
matchedsheet.Columns[0].CellStyle.NumberFormat = "*dd/mm/yyyy hh:mm:ss"  and range.CellStyle.NumberFormatIndex = 14; and
range.CellStyle.NumberFormatIndex = "D4";

all to no avail.
The column has a heading "Process Date' all other entries are like "24/3/2012"

Has anyone any thoughts on how to force an existing column to be formatted as date, or as a number ?

Thanks and regards

 


Gordon Hooton
Replied On January 13, 2013 02:39 PM

Just to correct the heading of this post

Manikandan M [Syncfusion]
Replied On January 16, 2013 06:04 AM

Hi Gordon,

Thanks for using Syncfusion products.

We are afraid that we are able to reproduce the issue "Numberformat is not set to already existing cell with datatime as value and text type as format". We have created the simplified sample to reproduce the issue and have attached the same in the below link.

Sample link:106358_Forum.zip

Reference runnable video:Forum106358Video.zip

If the above attached sample does not meet with your sample scenario, please modify the sample and revert back to us. So that we can proceed further on this issue.

Thank you very much for your patience.

Please let us know if you need any clarifications.

Thanks,
Manikandan.M

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.

;