Archive

Archive for February, 2007

\Slash/ – Windows meanings

February 27th, 2007 No comments

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:WINDOWSSYSTEM32 – Local path
Eg: MYCOMPUTERFOLDER UNC path. (which represents a ‘shared’ folder of a computer in the same LAN

VN:F [1.9.18_1163]
Rating: 0.0/5 (0 votes cast)
Categories: General

T-SQL Find previous month

February 22nd, 2007 No comments

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

VN:F [1.9.18_1163]
Rating: 5.0/5 (2 votes cast)
Categories: SQL

ASP.NET Page Life Cycle Overview

February 14th, 2007 No comments

http://msdn2.microsoft.com/en-us/library/ms178472(VS.80).aspx

VN:F [1.9.18_1163]
Rating: 0.0/5 (0 votes cast)
Categories: ASP.NET