How to get Server Actual time......

Posted by sourabhghosh49-13964 under ASP.NET on 4/11/2012 | Points: 10 | Views : 10432 | Status : [Member] | Replies : 7
Can any body tell me how to get server's time and date in asp.net.

Means not system datetime .....|||
Thanks

sourabh


Responses

Posted by: Kavi.Sirius on: 4/11/2012 [Member] Starter | Points: 25

Up
0
Down
hi,

This is the code to retrieve the server time in asp.net,

DateTime dt = new DateTime();
dt = DateTime.Now;


Regards,
kavi.n

Regards
Kavi.n

sourabhghosh49-13964, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: sourabhghosh49-13964 on: 4/11/2012 [Member] Starter | Points: 25

Up
0
Down
these are the code for retrieving system's date..

i want date synchronized by server..thanks

sourabh

sourabhghosh49-13964, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/11/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi

Refer My Code:

http://www.dotnetfunda.com/codes/code2223-getcurrent-date-and-time-in-textbox.aspx

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

sourabhghosh49-13964, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/11/2012 [Member] Bronze | Points: 25

Up
0
Down
Refer This

http://asp.net.bigresource.com/SQL-server-How-to-Synchronize-offline-online-database-DkANT5rzy.html

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

sourabhghosh49-13964, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 4/11/2012 [Member] Bronze | Points: 25

Up
0
Down
do you want to get web server's date and time or database server date and time?

DateTime dt = new DateTime();
dt = DateTime.Now;

this will give you web server datetime.

Thanks,
Rajni Shekhar

sourabhghosh49-13964, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hariinakoti on: 4/11/2012 [Member] Starter | Points: 25

Up
0
Down
hi,
check this link.

http://www.dotnetspider.com/forum/203401-How-get-server-time-asp-net.aspx

Thanks & Regards
Hari

sourabhghosh49-13964, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/12/2012 [Member] Bronze | Points: 25

Up
0
Down
Sourabh.Ghosh49@Gmail.Com

Have you Referd

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

sourabhghosh49-13964, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response