c# - Issue to get current system datetime dynamically using windows service -


issue: changing current system format mm/dd/yyyy mm/dd/yy

in console application using code follows

datetime.now.tostring(); 

output :18/08/13

in windows service same code using

datetime.now.tostring(); 

but output :18/08/2013

i checked reinstalling service also.but no use.

thanks in advance

the answer this forum question says:

if windows service running under system account or other account without profile use settings defined under hkey_users/.default/control panel/international registry key.

you can change these values control panel / regional , language options / advanced checking check box apply settings current user account , default user profile.

also, read more issue on similar question: why currentculture en-gb , currentuiculture en-us.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -