469,934 Members | 1,824 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

DateTime problem: how to create datetime format hh:mm:ss AM/PM without the date

my database has separate field for date and time so we can capture
employees' time in and out . In Sql, date can be present in smalldatetime
format, which contains only time hh:mm:ss AM/PM. How can I create datetime
format in C# like that in order to update database? Thanks in advance

Nov 16 '05 #1
1 9852
mimi <mh****@hotmail.com> wrote:
my database has separate field for date and time so we can capture
employees' time in and out . In Sql, date can be present in smalldatetime
format, which contains only time hh:mm:ss AM/PM. How can I create datetime
format in C# like that in order to update database? Thanks in advance


Just use DateTime, and the database should ignore the date part.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Krzysztof Skibniewski | last post: by
2 posts views Thread by Thomas Bärwinkel | last post: by
1 post views Thread by Nerds | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.