Click here to Skip to main content
15,878,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi ,
how to get ACTUAL date time and not system date time in C#
i am trying to do like this

C#
DateTime.Now.ToString("dd-mm-yyyy");


If the system date is wrong, then my application has getting current system date ..
please tell me how to get date from internet ..
Posted

You have two option:
Option 1:
Get Time from internet[^]
Option 2:
Get it from your DB server.


   --Amy
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 28-Jul-14 12:49pm    
5ed.
—SA
_Amy 28-Jul-14 12:54pm    
Thank you Sergey.. :)
I think you misunderstood the issue. I suspect you are running your code locally,right? If so, it will get your system DateTime right now as you are using local server,your system. Once you deploy it, it will get it from the machine where you deployed it,server.

Regards..
 
Share this answer
 
v2
Comments
u mani 28-Jul-14 8:52am    
ok fine thank u
Sergey Alexandrovich Kryukov 28-Jul-14 12:49pm    
Good point, a 5. It's likely that OP misunderstood it.
—SA
Thanks7872 28-Jul-14 14:42pm    
Thanks Sergey.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900