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
thayduckProgrammer AnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lcohanDatabase AnalystCommented:
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;
thayduckProgrammer AnalystAuthor Commented:
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.
lcohanDatabase AnalystCommented:
UPDATE databasename.tablename SET Time = '1900-01-01 13:50:45.000'

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
thayduckProgrammer AnalystAuthor Commented:
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 ?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.