Monday, September 22, 2008

Date formating is easy when you know it

Dear all,

Today i have task to do some date formating in DataGrid. So i think its easy but you don’t belive that its easy only when you remember the formating character.

Which i don’t really remember always and it is true. so for this purpose i am putting some format string here so at least i will get benifit in future.

Before starting i want to say if you are using type dataset for binding the grid please check your date column’s data type by mistake i did it string so be remember it should be date. here firstly we talk about time so here i goes.

h :- Displays the hour like (1,2,…12) remember limit & its mainly use with AM/PM format

hh :-Displays the hour like (01,02,…12) remember limit & its mainly use with AM/PM format

H :- It also display hours but diffrence is limit goes up to 23 like (1,2,3,….23) & not used with AM/PM format

HH :- It is same as H but diffrence is it start with 0 if number is less than double digit.

m :-Display the minutes.

mm :- it always show minutes in two digits.

s:- show seconds

ss:- Show seconds in always 2 digit like 00,01,02,…59

t :- it display first character of AM/PM

tt:- it Display either AM or PM

M:- it denotes month start from 0 - 12.

MM :- it also shows month but in double digit 01,…12

MMM :- shows month in 3 character like JAN, FEB

MMMM (+): Shows month with full name.

yy:- it show year last two digit

yyyy:- its show year like 1998, or we can say in 4 digit.

d :- Shows current day of the month.

dd:-It shows day in 2 digit always like 01,

ddd:- Show’s 3 character of the day like MON , TUE

dddd(+):- show full day character

exmaple x.ToString(”0:MM/dd/yy hh:mm:sstt)

Thanks …

Friday, September 19, 2008

Some Acronyms

Dear all,
Here is some useful acronyms
CCW COM Callable Wrapper
CLI Common Language Infrastructure. This is a subset of the CLR and base class libraries that Microsoft has submitted to ECMA so that a third-party vendor can build a .NET runtime on another platform.

CLR Common Language Runtime
CLS Common Language Specification
COFF Common Object File Format
COM Component Object Model
CTS Common Type System
DISCO Discovery of Web Services. A Web Service has one or more. DISCO files that contain information on how to access its WSDL.
DNA Distributed interNet Applications Architecture.
DOM Document Object Model
GDI Graphical Device Interface
GAC Global Assembly Cache
GUID Globally Unique Identifier
HTTP Hyper Text Transfer Protocol
IDL Interface Definition Language
IL Intermediate Language
MSIL Microsoft Intermediate Language
MS-DTC Microsoft Distributed Transaction Coordinator
N-Tier Multi-Tier
OLTP Online Transaction Processing
OLAP Online Analytical Processing
PE Portable Executable
RAD Rapid Application Development
RCW Runtime Callable Wrapper
SMTP Simple Mail Transfer Protocol
SOAP Simple Object Access Protocol
TCP Transport Control Protocol
TLB Type Library
UDF Uniform Data Format
UI User Interface
URL Uniform Resource Locator
UDDI Universal Description, Discovery and Integration
WAP Wireless Access Protocol
WSDL Web Services Definition Language
WML Wireless Markup Language
XML Extensible Markup Language