This seems to do the job:
create table T (ID int not null, Stamp1 datetime2 not null,
RealMillis int not null);
go
create trigger TT on T
instead of insert
as
set nocount on;
insert into T(ID,Stamp1,RealMillis)
select
ID,
DATEADD(millisecond,RealMillis - DATEPART(millisecond,Stamp1),Stamp1),
RealMillis --or 0 now that it's been used?
from inserted;
go
insert into T(ID,Stamp1,RealMillis) values (1,'2014-03-14T10:01:29.343',344);
go
select * from T;
I chose to do it as an instead of
trigger since it avoids having to write the wrong data to the table in the first place.