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
Jaspreet Singh
NA
20
3.8k
Date difference Function
Nov 7 2019 4:19 AM
Hello Team,
I am facing an issue while identifying the difference in dates. Here is my code:-
using System;
namespace Date_Difference
{
class Program
{
static void Main(string[] args)
{
string z = "2018, 11, 06";
string a = "2019, 11, 11";
Console.WriteLine(DateDifference(z, a));
Console.ReadLine();
}
public static string DateDifference(string x, string y)
{
string difference = Convert.ToDateTime(y - x);
return difference;
}
}
}
Can someone please help me to fix this issue.
Reply
Answers (
6
)
Response.AddHeader not working in c#
Can an abstract class have static methods?