date format in RB4.2

forum.reportbuilder (2000-2005) & forum.td.reportbuilder (2005-2010)
NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

date format in RB4.2

Post by NewsgroupServer » 07 Nov 2007, 13:01

 Posted by:  Stefan van Hest 

Hi,

I want to display the date as Wednesday, 7 November 2007

I found a way to get the month displayed correctly, however i have no idea
how to get the day correctly displayed.

Any ideas?

Stefan

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

date format in RB4.2

Post by NewsgroupServer » 07 Nov 2007, 14:55

 Posted by:  Jim McNamara 

On a quick scan through RB help I didn't spot at date to day of the week
function. Based on that I'd be inclined to do the work in the calling
application and pass the day as a variable - that of course assumes that
there is a calling app.

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

date format in RB4.2

Post by NewsgroupServer » 16 Nov 2007, 09:41

 Posted by:  Geert Schroeder 

Hello Stefan

You can do by writing a little report function:

Existng function WeekDay( Date ) delivers : 0 = Sutarday, 1 =
Sunday .... 6 =Fryday

==> WeekDayName =

StrIFF( WeekDay( dtYourDate ) - 5, "Fryday", "Thursday",
StrIFF( dtYourDate ) - 3, "Wednesday", "Tuesday",
StrIFF( dtYourDate ) - 1, "Monday, "Sunday",
"Saturday ) ) )

Best Regards
Geert

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

date format in RB4.2

Post by NewsgroupServer » 16 Nov 2007, 09:43

 Posted by:  Geert Schroeder 

.... "Saturday" )))

NewsgroupServer
Robot
Robot
Posts: 118939
Joined: 24 Feb 2017, 12:00
Location: World wide

date format in RB4.2

Post by NewsgroupServer » 19 Nov 2007, 05:05

 Posted by:  Mick D 

Hi Stefan
assuming the date you want to display is a date input variable\item have
you tried setting the Fmt (format) of the field in which it is displayed to
:

dddd, dd MMMM yyyy

It works under RB 4.1.

Regards
Michael

Return to “td.reportbuilder”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests