Rank: Member
Groups: Registered
Joined: 6/5/2014(UTC) Posts: 23 Location: Dublin Thanks: 1 times
|
Hi
I am currently trying to add Today's date to my Report header and this weeks Week Number.
I have successfully added my logo, Changed the Header Name but no matter which format I try to the Date it will not display. Is this possible?
Here are a few of my examples .... none of which work
<span class="title">"Daily Sales Report : " > < Date.Now() > </span> <span class="title">"Daily Sales Report : " > "@Raw(Report.Translate("Now"))" </span> # <span class="title">"Daily Sales Report : " > '@View.CultureInfo.DateTimeFormat.ShortDatePattern' </span>
Regards Siobhan
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Actually it is a pure c# problem.. I would suggest: Code:<span class="title">@DateTime.Now.ToString("d") @View.CultureInfo.Calendar.GetWeekOfYear(DateTime.Now, System.Globalization.CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday)</span>
You can get more about Date formatting at http://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspxGetting the week number is more tricky but you can find lot of samples in Google... epf
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.