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.

Formatting cells as time values

Thread ID:

Created:

Updated:

Platform:

Replies:

63089 Jun 27,2007 07:18 PM Jun 28,2007 04:15 AM Windows Forms 1
loading
Tags: XlsIO
Sean Greer
Asked On June 27, 2007 07:18 PM


How would I format a column of cells to be type "Time"? What I want is similar to setting the Category to "Time" and the Type to a particular format as is done in Excel by using the Format Cells dialog box.

Thanks...

Sean

Melba Winshia [Syncfusion]
Replied On June 28, 2007 04:15 AM

Hi Sean,

You can format cells as time values by using the following code snippets:

[C#]

sheet.Range["C2"].NumberFormat = "h:mm:ss";

Here is the sample for your reference:

http://websamples.syncfusion.com/samples/XlsIO.Windows/63089/main.htm

Kindly let me know if you have any other questions.

Thanks,
Melba

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.

;