Geeks With Blogs
faizan ahmad Usually the things which were not a straight Google July 2010 Entries
Custom Split function VB.NET
I ended up using the MS Excel objects to convert files from XLS to CSV . Converted CSV had comma "," as field separator. But, what if the a filed content has comma like "lastName,FirstName". Now if you use default .net split method to get the fileds of a row in csv file, it will treat "lastName,FirstName" as two fields. I ended up writing my own split method which will take care of the comma in fields: Private Function CustomSplit(ByVal sText As String,ByVal sSeparator As String) As String() Dim ......

Posted On Friday, July 16, 2010 6:45 PM

SQL Script to Get Last working Day
Presumption/limitation: yearly holidays are stored in a table maximum 2 consecutive holidays Table structure: HOLIDAY_DATE (DATETIME),HOLIDAY_DESC (VARCHAR) DB Script : DECLARE @CurrentDay DATETIME DECLARE @LastWorkingDay DATETIME, @CurrentWeekDay INT SET @CurrentDay = CAST(CONVERT(VARCHAR, GETDATE(), 101) AS DATETIME) SET @LastWorkingDay = CAST(CONVERT(VARCHAR, GETDATE(), 101) AS DATETIME) DECLARE @DaysToLastWorkingDay INT SET @DaysToLastWorkingDay = 0 SET @LastWorkingDay = DATEADD(day, -1, @LastWorkingDay ......

Posted On Friday, July 16, 2010 6:16 PM

Copyright © faizanahmad | Powered by: GeeksWithBlogs.net