Re: Extracting Time from the SQL DateTime field.




"v0lcan0" <UseLinkToEmail@xxxxxxxxxxxx> wrote in message
news:4_877989_087c9582517dd6a1f7813c2a746cac72@xxxxxxxxxxxxxxx
> 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-Discussions-Extracting-Time-SQL-DateTime-field-ftopict254266.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


.



Relevant Pages

  • Extracting Time from the SQL DateTime field.
    ... Any help on extracting the time part from the datetime field in SQL ... even though i had entered only the time part in the database when i ...
    (comp.databases.ms-sqlserver)
  • Re: Date vs DateTime
    ... The reason why the WHEREs will not handle our DateTime is that the database ... holds accurate information down to the 6th sig decimal figure on the ... and a DateTime field was set by the other application, ... it does make a difference when you are specifing them as ...
    (microsoft.public.dotnet.framework)
  • Re: Concurrency violation
    ... datetime field and the dataset. ... the database, it compares its "Original data"of the row with what is in ... datetime values only upto second. ...
    (microsoft.public.dotnet.languages.csharp)
  • Problems with images in MySQL database
    ... MySQL database and extracting them again. ... A piece of test code is below, the import script displays the image before ... Please ask if you need to know any other PHP configuration settings. ...
    (comp.lang.php)
  • Re: Concurrency violation
    ... database, it compares its "Original data"of the row with what is in the ... This comparison always result in difference in the datetime field. ... oAdapter.UpdateCommand.CommandText is like: "update aTable set ...
    (microsoft.public.dotnet.languages.csharp)