Showing posts with label timestamp. Show all posts
Showing posts with label timestamp. Show all posts

Sunday, February 19, 2012

About removal of TimeStamp from DateTime part in TSQL.

Hi friends,
Does anybody could say how to remove the TimeStamp from DateTime part
in TSQL.
Thanks&Regards
Sunil.
Sunil a crit :
> Hi friends,
> Does anybody could say how to remove the TimeStamp from DateTime part
> in TSQL.
> Thanks&Regards
> Sunil.
>
Example, actual date without time :
SELECT CAST(FLOOR(CAST(CURRENT_TIMESTAMP AS FLOAT)) AS DATETIME) AS
"CURRENT_DATE"
CURRENT_DATE
2006-02-15 00:00:00.000
A +
Frdric BROUARD, MVP SQL Server, expert bases de donnes et langage SQL
Le site sur le langage SQL et les SGBDR : http://sqlpro.developpez.com
Audit, conseil, expertise, formation, modlisation, tuning, optimisation
********************* http://www.datasapiens.com ***********************
|||Removing is not possible if you use a timestamp, though you can set it
to 00:00:00, but eleminating is NOT possible. Time is always stuck to
date and vice versa. If you want the two things separated, you have to
use a CHARACTER Storage like VARCHAR, then you can CONVERT the datetime
to any non-containing time-format.
HTH, jens Suessmeyer.
|||Hi
The time part of a datetime will always be stored in the database, even if
you do not specify it when you insert the date it will default the time to
00:00:00. For display purposes you can use the CONVERT function to display
only the date portion of the datetime in a string format. See Books Online
for more information.
John
"Sunil" wrote:

> Hi friends,
> Does anybody could say how to remove the TimeStamp from DateTime part
> in TSQL.
> Thanks&Regards
> Sunil.
>

About removal of TimeStamp from DateTime part in TSQL.

Hi friends,
Does anybody could say how to remove the TimeStamp from DateTime part
in TSQL.
Thanks&Regards
Sunil.
http://www.karaszi.com/SQLServer/inf...dOfTimePortion
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Sunil" <nsunildutt@.gmail.com> wrote in message
news:1140016409.964263.61880@.f14g2000cwb.googlegro ups.com...
> Hi friends,
> Does anybody could say how to remove the TimeStamp from DateTime part
> in TSQL.
> Thanks&Regards
> Sunil.
>
|||Thanks all .
Tibor provided an excellent link.
|||Thanks all .
Tibor provided an excellent link.

About removal of TimeStamp from DateTime part in TSQL.

Hi friends,
Does anybody could say how to remove the TimeStamp from DateTime part
in TSQL.
Thanks&Regards
Sunil.http://www.karaszi.com/SQLServer/info_datetime.asp#GettingRidOfTimePortion
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Sunil" <nsunildutt@.gmail.com> wrote in message
news:1140016409.964263.61880@.f14g2000cwb.googlegroups.com...
> Hi friends,
> Does anybody could say how to remove the TimeStamp from DateTime part
> in TSQL.
> Thanks&Regards
> Sunil.
>|||Thanks all .
Tibor provided an excellent link.|||Thanks all .
Tibor provided an excellent link.

About removal of TimeStamp from DateTime part in TSQL.

Hi friends,
Does anybody could say how to remove the TimeStamp from DateTime part
in TSQL.
Thanks&Regards
Sunil.Sunil a écrit :
> Hi friends,
> Does anybody could say how to remove the TimeStamp from DateTime part
> in TSQL.
> Thanks&Regards
> Sunil.
>
Example, actual date without time :
SELECT CAST(FLOOR(CAST(CURRENT_TIMESTAMP AS FLOAT)) AS DATETIME) AS
"CURRENT_DATE"
CURRENT_DATE
---
2006-02-15 00:00:00.000
A +
Frédéric BROUARD, MVP SQL Server, expert bases de données et langage SQL
Le site sur le langage SQL et les SGBDR : http://sqlpro.developpez.com
Audit, conseil, expertise, formation, modélisation, tuning, optimisation
********************* http://www.datasapiens.com ***********************|||Removing is not possible if you use a timestamp, though you can set it
to 00:00:00, but eleminating is NOT possible. Time is always stuck to
date and vice versa. If you want the two things separated, you have to
use a CHARACTER Storage like VARCHAR, then you can CONVERT the datetime
to any non-containing time-format.
HTH, jens Suessmeyer.|||Hi
The time part of a datetime will always be stored in the database, even if
you do not specify it when you insert the date it will default the time to
00:00:00. For display purposes you can use the CONVERT function to display
only the date portion of the datetime in a string format. See Books Online
for more information.
John
"Sunil" wrote:
> Hi friends,
> Does anybody could say how to remove the TimeStamp from DateTime part
> in TSQL.
> Thanks&Regards
> Sunil.
>

About removal of TimeStamp from DateTime part in TSQL.

Hi friends,
Does anybody could say how to remove the TimeStamp from DateTime part
in TSQL.
Thanks&Regards
Sunil.http://www.karaszi.com/SQLServer/in...idOfTimePortion
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Sunil" <nsunildutt@.gmail.com> wrote in message
news:1140016409.964263.61880@.f14g2000cwb.googlegroups.com...
> Hi friends,
> Does anybody could say how to remove the TimeStamp from DateTime part
> in TSQL.
> Thanks&Regards
> Sunil.
>|||Thanks all .
Tibor provided an excellent link.|||Thanks all .
Tibor provided an excellent link.