Link to home
Start Free TrialLog in
Avatar of nghiaap
nghiaap

asked on

Change Date Format programically

how can i change date format from mm/dd/yyyy to dd/mm/yyyy programically
further more only my app use the new format (dd/mm/yyyy), all others still use the old one
ASKER CERTIFIED SOLUTION
Avatar of Fahad Mukhtar
Fahad Mukhtar
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
only your application will use this format now..dd/mm/yyyy
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shilpa2784
shilpa2784

Try this,

CultureInfo ci = new CultureInfo("en-GB",true);
ci.DateTimeFormat.ShortDatePattern = "dd/mm/yyyy";
Application.CurrentCulture = ci;
shilpa2784 ,
why didnt you bothered to change the variable name from my code ? (myc to ci)


Avatar of nghiaap

ASKER

wa
there are tons of ways,
thanks u very much
i'll try all of them
Avatar of nghiaap

ASKER

hi, rama_krishna580
do you mean that your solution for web application