| |

VerySource

 Forgot password?
 Register
Search
View: 753|Reply: 5

Is there a direct type of hour, minute and second in sql server?

[Copy link]

6

Threads

11

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-2-18 22:00:01
| Show all posts |Read mode
Is there a direct type of hour, minute and second in sql server?
Reply

Use magic Report

0

Threads

49

Posts

35.00

Credits

Newbie

Rank: 1

Credits
35.00

 China

Post time: 2020-4-23 16:00:01
| Show all posts
only datetime or smalldatetime
Reply

Use magic Report

0

Threads

211

Posts

108.00

Credits

Newbie

Rank: 1

Credits
108.00

 China

Post time: 2020-4-23 18:15:01
| Show all posts
SQL SERVER does not have a separate date type and time type
Reply

Use magic Report

0

Threads

211

Posts

108.00

Credits

Newbie

Rank: 1

Credits
108.00

 China

Post time: 2020-4-23 19:45:01
| Show all posts
select convert (char (8), getdate (), 108)
--result
--------
22:46:56

(1 row (s) affected)


select convert (char (10), getdate (), 120)
--result
----------
2017-01-04

(1 row (s) affected)
Reply

Use magic Report

6

Threads

11

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

 Author| Post time: 2020-4-23 23:30:01
| Show all posts
108
120
What do they mean?
Reply

Use magic Report

0

Threads

211

Posts

108.00

Credits

Newbie

Rank: 1

Credits
108.00

 China

Post time: 2020-4-24 10:45:02
| Show all posts
108 is hh: mm: ss format
120 is yyyy-mm-dd hh: mm: ss format
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list