How to Get Short date in Proper Format?
-
hi i am using following function to get date.. gmdtrdate.Text = DateTime.Today.Date.ToShortDateString(); it is returning me 2/2/2008 can i get it like 02/02/2008 or i will have to attach 0 manually???
umerumerumer
-
hi i am using following function to get date.. gmdtrdate.Text = DateTime.Today.Date.ToShortDateString(); it is returning me 2/2/2008 can i get it like 02/02/2008 or i will have to attach 0 manually???
umerumerumer
use Response.Write(String.Format("{0:MM/dd/yyyy}", DateTime.Now()));
The miracle is this--the more we share, the more we have.
-
use Response.Write(String.Format("{0:MM/dd/yyyy}", DateTime.Now()));
The miracle is this--the more we share, the more we have.
i dont want to hard code these values i just want to pick according to the regional date settings... if american then MM/dd/yyyy if british then dd/MM/yyyy ....
umerumerumer
-
hi i am using following function to get date.. gmdtrdate.Text = DateTime.Today.Date.ToShortDateString(); it is returning me 2/2/2008 can i get it like 02/02/2008 or i will have to attach 0 manually???
umerumerumer
I checked on mine, its returning 21-02-2009. And It depends on client regional settings.
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L %^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2 W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN% Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia> -------------------------------------------------------- 128 bit encrypted signature, crack if you can