Link to home
Start Free TrialLog in
Avatar of pbc83
pbc83

asked on

Unable to change date format for text in the Eval function in asp:Label

I`m trying to change the format of a label that is getting its value from an Eval expression, e.g. Eval("DateModified"). See attached screenshot.

Peter User generated image
Avatar of rajvja
rajvja
Flag of United Kingdom of Great Britain and Northern Ireland image

<%# EVAL(ds,fldname).ToString("yyyy-MM-dd").ToString() %>

try this way
SOLUTION
Avatar of pbc83
pbc83

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
ASKER CERTIFIED 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 pbc83
pbc83

ASKER

Solution works.