日历日期时间问题 [英] calender date time problem

查看:85
本文介绍了日历日期时间问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好
首先,我想说这个网站为我提供了很多帮助,我借此机会感谢所有在过去的问题中为我提供帮助的人,希望将来我能像在我身边一样成为其他帮助我的人

我有一个小问题,我有一个databse字段,我在vb.net中保存了一个压延机中的日期,但是当我单击保存"按钮时,该日期被保存了,但带有时间戳的总是= 12:00:00 AM是用什么方法只保存日期?

如果有人可以帮助我,那么datafield的类型为datetime plz,我很感激

谢谢您

[edit]删除了粗体的虚假粗体-OriginalGriff [/edit]

hello
first of all i want to say that this web site has helped me alot and i take the chance to thank all the ones who helped me in my past question hope in the future i can be one who helps sm1 else as you did with me

anw i have a little problem i have a databse field where i save date from a calender in vb.net but when i click the save button the date is save but with a time stamp wich is always = to 12:00:00 AM is the any way to save only the date ?

the datafield is of type datetime plz if anyone can help me i apreciate that

hank you in advanced

[edit]Spurious bold removed - OriginalGriff[/edit]

推荐答案

SQL DateTime字段将始终具有时间成分,即其存储的内容:日期,带有时间(因此得名).
如果您需要不带时间(甚至是默认时间,如00:00或12AM)进行存储,则需要使用日期"字段.

亲身?我不会打扰-我会选择DateTime,因为它允许将来扩展.
An SQL DateTime field will always have a time component - that is what it stores: A date, with a Time (hence the name).
If you need to store it without a time (even a default time such as 00:00 or 12AM) then you need to use a Date field instead.

Personally? I wouldn''t bother - I''d go with the DateTime as it allows for future expansion.


这篇关于日历日期时间问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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