LoginSignup
0
0

More than 5 years have passed since last update.

SQLServer 秒部分を取り除く(HH:MM)

Last updated at Posted at 2017-06-01

conertでhh:mi:ssにして、SUBSTRINGを使うという意外に単純な方法だが日本語の記事がなかったので、記載しました。

// GETDATE() から hh:mm

SUBSTRING(convert(varchar, GETDATE(),108),1,5)

参考

HH:MM Format in SQL Server [duplicate]

0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0