NinethSense oWnZ mE!: Praveen’s drawing book

Choose a Topic:

Tue
27
Feb '07

\Slash/ - Windows meanings

I saw most of the developers confused with both ’slashes’. Here is a small reference:


/ - Used in URLs
- Used as a “switch” identifier. Mostly used in command prompts.
Eg: DIR /P - Here /P is the switch for page-wize listing.


\ - Used in paths
Eg: C:\WINDOWS\SYSTEM32 - Local path
Eg: \MYCOMPUTER\FOLDER UNC path. (which represents a ’shared’ folder of a computer in the same LAN
Thu
22
Feb '07

T-SQL Find previous month

For a projet I had to find the previous month - in format ‘mm.yyyy’.

Here is the code:
– =============================================
– Author:		Praveen
– Create date: 22-02-2007
– Description:	To find the previous month in format ‘month.year’
– =============================================
 
CREATE FUNCTION dbo.gf_PreviousMonth (@d char(7))
RETURNS char(7) 
AS 
BEGIN 
	DECLARE @dt AS datetime
	SET              @dt = dateadd(year, (CONVERT(int, substring(@d, charindex(‘.’, @d, 0) + 1, 4))) - 2000, ‘1/1/2000′)
	SET              @dt = dateadd(month, (CONVERT(int, substring(@d, 1, charindex(‘.’, @d, 0) - 1))) - 1, @dt)
	SET              @dt = dateadd(month, - 1, @dt) 
	RETURN CONVERT(varchar(2), month(@dt)) + ‘.’ + CONVERT(varchar(4), year(@dt)) 
END
 
 
Wed
14
Feb '07

ASP.NET Page Life Cycle Overview

http://msdn2.microsoft.com/en-us/library/ms178472(VS.80).aspx
The CodeProject Microsoft Developer Network Official ASP.NET Forums Microsoft .NET Framework Community Microsoft Most Valuable Professional Kidoos forums Microsoft Visual Studio Developer Home Professional Information Technology Solutions Microsoft Research Home Trivandrum Microsoft Users Group Community Website