...e result is getting not right where the result is giving an incorrect date(01/01/0001)
Hi All,
User is using the below script under HeidiSQL and data items are TR.EventStartDate but the result is getting not right where the result is giving an incorrect date(01/01/0001).
INSERT INTO `custom_scripts` (`Script_Name`, `Script_Type`, `Script_Index`, `Users`, `Source_Code`) VALUES ('MonthPctChange Column', 2, 3, NULL, 'using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n\r\nusing API;\r\n\r\npublic class MonthPctChangeColumn : ICustomPositionColumn\r\n{\r\n public string ColumnName\r\n {\r\n get { return "MONTH % CHANGE"; }\r\n }\r\n\r\n public Type DataType\r\n {\r\n get { return typeof(decimal); }\r\n }\r\n\r\n public object GetColumnValue(IPosition posn, IPositionRow row)\r\n {\r\n return CustomPositionDataManager.GetFeedDecimal(posn.Security.SN, posn.Security.TickerSN, "MonthPctChange");\r\n }\r\n}\r\n\r\n');
INSERT INTO `custom_scripts` (`Script_Name`, `Script_Type`, `Script_Index`, `Users`, `Source_Code`) VALUES ('NextEarningsDate Column', 2, 1, NULL, 'using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n\r\nusing API;\r\n\r\n/// <summary>\r\n/// Sample custom column code\r\n/// </summary>\r\npublic class NextEarningsDateColumn : ICustomPositionColumn\r\n{\r\n public string ColumnName\r\n {\r\n get { return "NEXT EARNINGS DATE"; }\r\n }\r\n\r\n public Type DataType\r\n {\r\n get { return typeof(DateTime); }\r\n }\r\n\r\n public object GetColumnValue(IPosition posn, IPositionRow row)\r\n {\r\n return CustomPositionDataManager.GetFeedDate(posn.Security.SN, posn.Security.TickerSN, "NextEarningsDate");\r\n }\r\n}\r\n\r\n');
INSERT INTO `custom_scripts` (`Script_Name`, `Script_Type`, `Script_Index`, `Users`, `Source_Code`) VALUES ('WeekPctChange Column', 2, 2, NULL, 'using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n\r\nusing API;\r\n\r\n/// <summary>\r\n/// Sample custom column code\r\n/// </summary>\r\npublic class WeekPctChangeColumn : ICustomPositionColumn\r\n{\r\n public string ColumnName\r\n {\r\n get { return "WEEK % CHANGE"; }\r\n }\r\n\r\n public Type DataType\r\n {\r\n get { return typeof(decimal); }\r\n }\r\n\r\n public object GetColumnValue(IPosition posn, IPositionRow row)\r\n {\r\n return CustomPositionDataManager.GetFeedDecimal(posn.Security.SN, posn.Security.TickerSN, "WeekPctChange");\r\n }\r\n}\r\n\r\n');
INSERT INTO `quote_vendor_fields` (`Quote_Vendor`, `Security_Type`, `Internal_Field_Name`, `Feed_Field_Identifier`, `Feed_Alternate_Field_Identifier`, `Field_Type`, `Input_Value`, `Multiplier`, `Request_Type`) VALUES (37, 'Stock', 'NextEarningsDate', 'TR.EventStartDate', NULL, 10, NULL, NULL, 1);
INSERT INTO `quote_vendor_fields` (`Quote_Vendor`, `Security_Type`, `Internal_Field_Name`, `Feed_Field_Identifier`, `Feed_Alternate_Field_Identifier`, `Field_Type`, `Input_Value`, `Multiplier`, `Request_Type`) VALUES (37, 'Stock', 'MonthPctChange', 'TR.PricePctChgMTD', NULL, 9, NULL, NULL, 1);
INSERT INTO `quote_vendor_fields` (`Quote_Vendor`, `Security_Type`, `Internal_Field_Name`, `Feed_Field_Identifier`, `Feed_Alternate_Field_Identifier`, `Field_Type`, `Input_Value`, `Multiplier`, `Request_Type`) VALUES (37, 'Stock', 'WeekPctChange', 'TR.PricePctChgWTD', NULL, 9, NULL, NULL, 1);