Click here to Skip to main content
15,884,770 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to convert Railway time to indian Time in vb.net or c#
for example attandance management system intime is AM and out time is PM.and this time from sql server to c# .In railway time it is out time 18.00 hrs its displayed .. i want to change 06.pm
Posted
Updated 29-Mar-16 7:26am
Comments
Zoltán Zörgő 15-Jun-13 6:19am    
This is no conversion, it is simply the formatting of the same datetime value.
Member 12346521 29-Mar-16 13:26pm    
can any one tell me how to get Indian railway time table in asp.net c#

Refer to these links you will find lots of sample strings related to time.

Custom Date and Time Format Strings[^]

how to convert 24-hour format TimeSpan to 12-hour format TimeSpan?[^]

Regards.. :laugh:
 
Share this answer
 
v3
This is no conversion, it is simply the formatting of the same datetime value which you could do on sql server side, but I suggest you do it on presentation side. Look here for format string: http://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.100).aspx[^].
Where and how you can specify this format string depends on the control you are using to display the datetime value. You could also change the culture of your application or make it culture-aware, but that is not easy, and might not be necessary either in it's whole extent.
 
Share this answer
 

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