如何节省时间为HH / MM / - AM / PM甲酸盐 [英] How to Save Time as HH/MM/- AM/PM formate

查看:85
本文介绍了如何节省时间为HH / MM / - AM / PM甲酸盐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想将数据库中的时间存储为HH / MM / - AM / PM格式但是当我使用ado.net插入此值时,我收到类似String的错误,因为它未被识别为有效的DateTime。任何人都可以帮我解决这个问题....

Hello , I Want to stored Time In Database as HH/MM/- AM/PM formate But when i Insert this values using ado.net i got an error like String was not recognized as a valid DateTime. anyone can help me regarding this issue....

推荐答案

你永远不会将日期或时间格式化为字符串,以便将其存储在数据库中...你将它存储为二进制文件只有当它涉及到UI时才会对其进行格式化和格式化!
You never format date or time as string for storing it in the database...You store it as binary value and format it only when it comes to the UI!!!


这篇关于如何节省时间为HH / MM / - AM / PM甲酸盐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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