Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Manipulating employee punchtimes

Author  Topic 

ninel
Posting Yak Master

141 Posts

Posted - 2007-02-27 : 16:37:40
I have a table that keps tracks of employees punch ins and outs.


CREATE TABLE [EmployeePunch] (
[scalldate] [varchar] (20) NULL ,
[sEmployeeId] [varchar] (20) NULL ,
[TotalHr] [numeric] (10,4) NULL ,
[sLogin] [varchar] (20) NULL ,
[sLogout] [varchar] (20) NULL
)

INSERT [EmployeePunch] (scalldate, sEmployeeId, TotalHr, sLogin)
VALUES ('20070227', '123', 8.5, '09:00:00')

INSERT [EmployeePunch] (scalldate, sEmployeeId, TotalHr, sLogin)
VALUES ('20070227', '456', 6.256, '09:00:00')


I have a file that needs to be loaded into that table.
The file contains sCalldate, sEmployeeId, totalhr, and slogin.

Ex:
20070227, 123, 8.5, 09:00:00

Does anyone know how to add 8.5 to 09:00:00 to get 17:30:00???

Thanks,
Ninel

pbaldy
Starting Member

7 Posts

Posted - 2007-02-27 : 16:42:12
Does the DateAdd function serve your needs?

Paul
Go to Top of Page
   

- Advertisement -