472,126 Members | 1,557 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,126 software developers and data experts.

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 9930
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 Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.