Changing date format in Tool Tips?

I want to change the format of the “Clock In” and “Clock Out” to only show the time, and have the time be in am/pm format. I don’t find anything in the Properties that allows me to set this.

image

Thanks!

In order to get the desired result, you may create a Custom Time Dimension which only includes the Hour and Minute levels and set the formatting of the selected levels as below:

image

and then Promote your date/time dimension at cube level.

Or, if you do not have a data cube, you may use the new Time Dimension directly, from the Explore panel -> Data Connector -> your target structure -> select the date/time dimension -> expand and drag and drop the newly created Time dimension to the Data Analysis Panel:

image

As the last step, open the ‘Visualization’ tab of your metric set and add that dimension under ‘TOOLTIP’ section, as shown below

Where is this tooltip showing? I can’t tell from your image if it’s a row header, a cell value, a column header, etc.

If it’s not a row header, you can edit it like this:
[date:yyyy-MM-dd]
in the settings for the tooltip. This is usually found under the Text portion of the item’s properties.

For more formats, see: https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

Azar - Thanks!

Ken - I like your solution because I don’t have to alter the data cube, which is beyond my permissions level. I’m having an issue getting the AM/PM to show though…the page of formatting options you linked to says that “h:mm a” should give me what I want:

But instead of seeing 7:25 AM and 11:31 PM, I see this:

I’ve tried other options and some work, some don’t. Does Dundas have a proprietary set of codes?

1 Like

You may try [ClockIn:t] instead and see the result in Short Time Format.
Here you can find more of these format setting with measure and hierarchy keywords:

(This should work with raw Date/Time dimensions that are not promoted with a custom time dimension)

That did it!

Using a single “t” only gave me the “A”, but using “tt” gave me “AM”. :slight_smile:

Thanks!