如何将铁路时间转换为印度时间 [英] How to convert Railway time to indian Time

查看:97
本文介绍了如何将铁路时间转换为印度时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在vb.net中将铁路时间转换为印度时间或c#

例如,达到管理系统的时间是AM,出门时间是PM。这次是从sql server到c#。在铁路时间它是时间18.00小时它显示..我想改变06.pm

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

推荐答案

参考这些链接,你会发现许多与时间相关的示例字符串。



自定义日期和时间格式字符串 [ ^ ]



如何将24小时格式的TimeSpan转换为12小时格式的TimeSpan? [ ^ ]



问候..:笑:
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:


这不是转换,只是格式化相同的日期时间值你可以在sql server端做,但我建议你在演示方面做。在这里查看格式字符串: http://msdn.microsoft.com/en -us / library / 8kb3ddd4(v = vs.100).aspx [ ^ ]。

在何处以及如何指定此格式字符串取决于用于显示日期时间值的控件。您也可以更改应用程序的文化或使其具有文化感知能力,但这并不容易,并且可能在整个范围内都没有必要。
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.


这篇关于如何将铁路时间转换为印度时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆