cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamp handling in WEBI

Former Member
0 Kudos

Dear All.

My requirement is to show the Group information base on the Datetime column in DB.

i want to show A,B,C or D base on the Datetime column.

we have lots of function to handle dates but not for the time, kindly please let me know how to handle this.

06:00 u2013 14:00 A

14:00 u2013 22:00 B

22:00 u2013 06:00 C

Kind regards,

Accepted Solutions (1)

Accepted Solutions (1)

arijit_das
Active Contributor
0 Kudos

Create a variable Timestamp as:


=ToNumber(FormatDate([DateTime Object];"hhmm"))

Then create the Group variable as:



=If([Timestamp] between (600;1400);"A";If([Timestamp] between (1400;2200);"B";"C"))

Former Member
0 Kudos

Dear Brother.

When i apply =ToNumber(FormatDate([TapTime];"hhmm")) formula it give the result #Format.

the type of TapTime is as Date in the universe and it contain Datatime information.

please suggest

Kind regards,

arijit_das
Active Contributor
0 Kudos

If you drag the TapTime object in a webi report, can you see any timestamp ?

Former Member
0 Kudos

Yes Brother i can see the time stamp '06-10-2011 22:30:13' this value i have copied from one of the cell.

Kind regards,

arijit_das
Active Contributor
0 Kudos

then the formula should work.

what if you use the formula below:

=FormatDate([TapTime];"hhmm"))

does it throw any #format error?

I assume that the object is of date type.

Former Member
0 Kudos

Dear Brother.

Yes it is of Date time and the =FormatDate(TapTime;"hhmm")) works great, can you please explain why the previous one was not working.

however by your advice i solved my problem thanks you alot.

Kind regards,

arijit_das
Active Contributor
0 Kudos

The previous one should work too. Also defining the Timestamp variable as =FormatDate([TapTime];"hhmm")) will not give you the correct result. You have to convert the string to a number and then use between operator.

Answers (0)