how i can take server date time at the time of registration ?

Posted by Jahi under ASP.NET on 5/14/2011 | Points: 10 | Views : 1177 | Status : [Member] | Replies : 4
Sir,

how i can get server date time at the time of registration ?




Responses

Posted by: SheoNarayan on: 5/14/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Write something like this

DateTime currentDateTime  = DateTime.Now;


Save the currentDateTime into the database.

Thanks


Regards,
Sheo Narayan
http://www.dotnetfunda.com

Jahi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jahi on: 5/14/2011 [Member] Starter | Points: 25

Up
0
Down
sir,


Datetime.now is not server datetime. This is system datetime.

Thank regards
Jahi

Jahi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: SheoNarayan on: 5/14/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
When you host your application on the server that is nothing but the system and when you use DateTime.Now it gives you the system date time where the code is executing and that system is nothing but your server (isn't it?)

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Jahi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jahi on: 5/16/2011 [Member] Starter | Points: 25

Up
0
Down
hi sir,

i'm really sorry sir.
I've mistaken about your answer. This is correct code. Sorry , sorry sir. I' m misunderstanding you.

Regards,
Jahi

Jahi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response