TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Tommy Sin
NA
19
104.3k
Change Excel Date Format using C#
Feb 18 2011 2:33 PM
Hi,
I am just wondering how I can change the Excel Date Format using C#.
I declared the date as string like "1-Apr-09" and I know it shows 39,904 if I change the format cell in excel.
How do I do that using C#? Please refer to the code below. Could anyone please implement
double DateChangeToDouble(string a) below? Thank you so much.
Class Program
{
double DateChangeToDouble(string a)
{
double b;
// Implementing a to change to double value here
return b;
}
static void Main(string[] args)
{
string a = "1-Apr-09";
double b = DateChangeToDouble(a); //double b should be 39904 here.
Console.WriteLine(b); //39904
}
}
Reply
Answers (
1
)
How to generate a group of file names in SQL?
How to update a record with primary key using stored procedure.