I want to put a variable in a aspx so when publishing it transform to actual date...
I mean I want to change
Actual date: 23/12/10for
Actual date: $dateand when it compiles it gets rendered
I want to put a variable in a aspx so when publishing it transform to actual date...
I mean I want to change
Actual date: 23/12/10for
Actual date: $dateand when it compiles it gets rendered
You can simply use:
Actual date: <%=Date.Now.ToString("dd/MM/yy")%>
See this handy list of DateTime.ToString
formats.