Former Member

# Date format in webi

Hi Experts

I am unable to change my current date format that is in 10/12/2010 into 10th December 2010 in webi . Pls help me to solve this.

One more thing is that in one of the pdfs i could come across the following

DayNumberOfYear

Description : Returns the number of the day in the year in a date

Syntax:integer DayNumberOfYear(date input_date)

Output

The number of the day in the year

Example

DayNumberOfYear([Reservation Date]) returns 349 when the date in

[Reservation Date] is 15 December 2001

My question is

What is this reservation date?

For the whole Date and time function he used this reservation date as the object.I couldnt follow this..

Try to explain it with an example.. i mean the procedure that i need to follow in order to get this.?

Thank you

Regards

sharath

10|10000 characters needed characters exceeded

### Related questions

• Former Member
Posted on Dec 10, 2010 at 03:46 PM

You should use a formula in a variable to get your desired format. I am going to assume you have an object in your universe called Date or

`[Date]`

as it will appear when used in a Webi formula. To get the date format:

`= substr([Date];0;2) & Month([Date]) & substr([Date];6;11)`

Also, the code to return the number of the day in the year:

`= DayNumberOfYear([Date])`

The example was using

`[Reservation Date]`

as an example of a Date type object in Webi. It could equally have been

`[Posting Date]`

.

10|10000 characters needed characters exceeded
• Posted on Dec 12, 2010 at 05:59 PM

Hi Sharath,

To answer the date format query, let me assume that you have an object

`[Date]`

of type Date.

In WebI, you can use the formula

` =FormatDate([Date];"ddth Mmm yyyy") `

to get the desired date format.

If the object is of type Character and retuns the date in format dd/MM/yyyy, then you have to convert it into a date before using FormatDate function. In this case you can use the formula

`=FormatDate(ToDate([Date];"dd/MM/yyyy");"ddth Mmm yyyy") `

The function DayNumberOfYear takes a parameter of type date and returns the no of days elapsed till that date since the beginning of that year.