Create program in c# to convert system date into seconds
₹600-1500 INR
完了済み
投稿日: 6年近く前
₹600-1500 INR
完了時にお支払い
convert datetime into seconds in c#
its difficult for me because windows provide different different time format
long , short like yy-mm-dd , dd-yy-mm , yyyy-mmm-dd and lots more
So i want general method which will convert all date time in seconds
currently i am using this method
public int calculateSeconds(DateTime dateTime)
{
DateTime dt = new DateTime(1970, 1, 1, 0, 0, 0, 0, [login to view URL]);//from 1970/1/1 00:00:00 to now
//DateTime dtNow = [login to view URL];
DateTime dtNow = dateTime;
TimeSpan result = [login to view URL](dt);
int seconds = [login to view URL]([login to view URL]);
return seconds;
}
. I want you to generalise this method which will work in all format.
I have two years of experience in IT company as a dot net developer and ready to work with you with minimum amount as i want to start my career as a freelancer.
you can expect good work on time.
Thanking you in advance.