DECLARE @DriveDate AS VARCHAR(20)
DECLARE @int AS VARCHAR(20)
DECLARE @StartDate AS VARCHAR(10)
DECLARE @EndDate AS VARCHAR(10)
DECLARE @WarehouseCode AS VARCHAR(10)
DECLARE @ID AS VARCHAR(10)
-- ID = 1 -- ID = 2 -- ID = 3 -- ID = 4
SET @ID = 1
SET @StartDate = '2008/08/01'
SET @EndDate = '2008/08/31'
SET @int = 1
SET @DriveDate = @StartDate
print DATEDIFF( hh, @DriveDate , @EndDate )
print @DriveDate
SET @DriveDate = DATEADD( day ,1,@DriveDate)
print @DriveDate
print convert ( varchar , @DriveDate , 111)