471,088 Members | 1,233 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Extracting Time from the SQL DateTime field.

Any help on extracting the time part from the datetime field in SQL
database.

even though i had entered only the time part in the database when i
extract the field it gives me only the date part. iím using Vb.net
datagrid as a front end.

any assistance appreciated!! :?:

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/General-Disc...ict254266.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=877989
Sep 8 '05 #1
1 16977

"v0lcan0" <Us************@dbForumz.com> wrote in message
news:4_***************************************@dbf orumz.com...
Any help on extracting the time part from the datetime field in SQL
database.

even though i had entered only the time part in the database when i
extract the field it gives me only the date part. i'm using Vb.net
datagrid as a front end.

any assistance appreciated!! :?:

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL:
http://www.dbforumz.com/General-Disc...ict254266.html
Visit Topic URL to contact author (reg. req'd). Report abuse:
http://www.dbforumz.com/eform.php?p=877989


See CONVERT() in Books Online:

select convert(char(8), getdate(), 108)

For more general information about working with datetime data, see here:

http://www.karaszi.com/sqlserver/info_datetime.asp

Simon
Sep 8 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Shapper | last post: by
4 posts views Thread by John | last post: by
4 posts views Thread by Michael Turner | last post: by
10 posts views Thread by Dale | last post: by
6 posts views Thread by fniles | last post: by
4 posts views Thread by Steve | 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.