If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

How to get rid of seconds in a datetime function

Started by v2k4u, 06 Apr 2015 09:53:20 AM

Previous topic - Next topic

v2k4u

Hi Gurus,

I have a quick question on how to get rid of seconds from a datetime function so that i can group the datetime until Min.

For ex:
     Current Date                              Expected Date
2014-01-01 19:20:25                2014-01-01 19:20

Thanks,
Vinod kumar.

Joker

Hi,

Go to:
Data Format->Format Type(date/time)-->Properties-->Display Seconds->'No'

Regards,
Joker

v2k4u

I tried doing the same but the grouping doesn't work properly if i do as stated below.

I also have a requirement to group all the timings together if they are just having 2 different dates with the seconds being different.

bdbits

What Joker said will take care of it from a display perspective, but will not change the underlying values. If you actually want to get rid of the seconds, you need a data item based on an expression. Then you use the data item for grouping. But you have not provided enough information for anyone to help with the syntax for the expression. For example, what function are you using? What kind of data source do you have, and what is the model type (dimensional, relational, etc.).