Go to home page mail me! RSS Feed

June 2009 Entries

Convert virtual path to absolute or relative path

There are a lot of goodies embedded in the framework, problem is, there are so many namespaces that it is almost impossible to know them all, as a matter of fact I doubt that there is any one person that knows all of the framework in and out. As usual, this post is about my experience with weird code that could have been done easily using existing built functions. I’ve seen developers write 20+ lines of code to this stuff while covering every possible scenario. convert to absolute System.Web.VirtualPathUtility.ToAbsolute(params); ...

posted @ Monday, June 08, 2009 5:43 PM | Feedback (15)

Converting SQL DateTime to Date

Apparently, converting a SQL long datetime string to just a date seems to be a head banger for some people. therefore, I’ve decided to publish the way I do it, which I believe is easy and probably the most efficient. convert(varchar(10),[datetimecolumnname],101)   replace [datetimecolumnname] with the column name of the actual column that is of datetime data type.

posted @ Monday, June 08, 2009 11:09 AM | Feedback (0)

Next entries »