Forum Replies Created

Viewing 6 posts - 1 through 7 (of 7 total)

  • RE: Normalization of Date

    I am only interested in 2 columns here :

    _Addwhen - format is 20100303 9:41:3000

    Normalized_Add_When - format should be format is 20100303 9:45 (after I run my stored procedure)

    The other columns...

  • RE: Normalization of Date

    It seems to work perfectly in my computer,here is the full procedure

    USE [Cortex]

    GO

    /****** Object: StoredProcedure [dbo].[SPNormalizeAddWhen1] Script Date: 03/09/2010 14:26:40 ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    ALTER PROCEDURE...

  • RE: Normalization of Date

    insert into XXNkk_Fact_PnLSummary1 values ('Global Dynamic Asset Allocation', 'MTD','LPLUS','NULL','NULL',-0.000414,-326206.9786,-0.002742,2010-02-18 16:06:03.000,2010-03-09 13:26:30.000,a21249,Feb GDAA Summary.xls,NULL,2010-03-09 13:30:00.000)

  • RE: Normalization of Date

    DDL below :

    GO

    CREATE TABLE [dbo].[XXNkk_Fact_PnLSummary1](

    [AccountName] [nvarchar](255) NOT NULL,

    [FundName] [nvarchar](255) NOT NULL,

    [PercentageYTD] [decimal](18, 2) NULL,

    [DollarYTD] [money] NULL,

    [PercentageMTD] [decimal](18, 6) NULL,

    [DollarMTD] [money] NULL,

    [PercentageDayChange] [decimal](18, 6) NULL,

    [SummaryDate] [datetime] NULL,

    [_Addwhen] [datetime] NULL,

    [_AddBy] [nvarchar](255) NULL,

    [_AddBySystem]...

  • RE: Normalization of Date

    Thanks Lynn,your code works perfectly but how do I use it in my current code:

    here is my set statement :

    declare @sql nvarchar(500)

    set @sql='update XXNkk_Fact_PnLSummary1 set [' + @colname + ']...

  • RE: Normalization of Date

    Hi:

    It would be to the nearest 15th minute handle

    eg :

    9:33:3000 ----------------> 9:30

    9:38:3000 ----------------->9:45

    9:42:3000 ----------------->9:45

    hope that is clear,but is my code not correct in its logic?

Viewing 6 posts - 1 through 7 (of 7 total)