Here's my database structure (simplified):
if db_id('MovieDB') is null
create database MovieDB;
go
use MovieDB;
go
if object_id(N'Movies', N'U') is null
create table Movies
(
MovieID bigint not null identity primary key,
Duration time(7) not null,
);
insert into Movies values
(format(dateadd(minute, 142, 0), N'hh:mm:ss', 'en-US'));
I inserted the duration as minutes and I need it to be converted to hh:mm:ss
format. However, with the execution of this I get 02:22:00.0000000
.
How can I format the date to get just 02:22:00
?