0

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/10

for

Actual date: $date

and when it compiles it gets rendered

BIBD
  • 15,107
  • 25
  • 85
  • 137
Luis Molina
  • 547
  • 1
  • 5
  • 15

1 Answers1

0

You can simply use:

Actual date: <%=Date.Now.ToString("dd/MM/yy")%>

See this handy list of DateTime.ToString formats.

Oded
  • 489,969
  • 99
  • 883
  • 1,009
  • excuse me , i dont explain it well, i dont want to do it in aspx, but in visual studio publishing, i mean: only when i click on publish site, like a msbuild action post publication... – Luis Molina Mar 05 '10 at 11:07