Link to home
Start Free TrialLog in
Avatar of thayduck
thayduckFlag for United States of America

asked on

TimeStamp

How can I do what is being done to create a timestamp in this SSIS task but do it in SQL 2008 in a stored procedure so I can update a field. The Time field is called Time. The field should look like this when done.

1900-01-01 13:50:45.000
SSIStaskPNG.PNG
Avatar of lcohan
lcohan
Flag of Canada image

You can create a SQL Stored procedure to insert/update the whatever database.table.Time column with timestamp and call it in the SSIS right? Is this what you mean?

UPDATE databasename.tablename SET Time = timestamp;
Avatar of thayduck

ASKER

I want to create a timestamp of  1900-01-01 13:50:45.000 .

I want the date to be 1900-01-01 followed by the time. Person did it in the SSIS package.
I want to do the same thing in the stored procedure.
I want duplicate what he did in the SSIS package but do it in a stored procedure.
ASKER CERTIFIED SOLUTION
Avatar of lcohan
lcohan
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, that worked.

Quick question:
I have 2 VARCHAR fields that only contain starting time and ending time.
23:56:39   23:56:59   looking for answer of 20
23:56:39   23:57:59   looking for answer of 80
How can I calculate the number of seconds elapsed between these 2 times ?