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. Image for the cookie policy date
close icon

Setting and existing Colum as a date

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

 


2 Replies

GH Gordon Hooton January 13, 2013 07:39 PM UTC

Just to correct the heading of this post


MM Manikandan M Syncfusion Team January 16, 2013 11:04 AM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon