UK Date format

Hi All,
I’m trying to generate a graph but struggling to put a date field into the UK date format (dd/mm/yyyy), rather than US. I’ve had look around the help functions but can’t find anything. Any ideas?
Thanks

Try this:

concatenate(substring(dayofmonth(RUN_DATE),0,2),"-",substring(month(RUN_DATE),0,2),"-",substring(year(RUN_DATE),0,4))

Good luck!

1 Like

Thanks, unfortunately I’ve tried this already. Transforming a date into text format plays havoc with the date alignment when Rebus puts it into a graph/table (13/08 next to 13/09). Keen to keep this in a date format so that the rest of the formatting works appropriately.

Many thanks

Hi Laurence,

Are you able to post a screen image, so we can see what you mean by the issue of date alignment?
Also I am pretty sure we can put together a function(s) for the different date formats pretty quickly.
It’s a holiday here in Canada and the US. We can get on this tomorrow.

In the meantime that screen image(with a small explanation) would be really helpful

Thanks
Gerry

image
Thanks Gerry; attached screenshot of a pivot table I’ve created when re-creating the date in a text format. Preference would be to retain the date in a date format, so just having a dd/mm/yyyy format available.

2 Likes

Thanks Laurence,

I took a look a look at trying to get this to work using some of our built-in graph functions but there are only couple date formats. But I did see that the way it is done it should be relatively easy for us to add new ones and it should not take too long.

I will talk with the team tomorrow.

Thanks
Gerry

1 Like

As a resolution to this problem, here is what we did and how you can implement it.

In the widget builder, in the display fields we converted the date to a string in the format of MM-DD-YYYY. Then in the Design Chart phase, you would setup your pivot as you normally would. Then in the columnDefs section look for your date field. Within the your date field add a property (this is new) called pivotComparatorWidgetFunction. You will then be prompted to select a function from a dropdown to use for this property. Select “GRID PIVOT SORTATION MM-DD-YYYY”. Once this is done, save the widget. You will now notice that the date in the pivot banner is sorted correctly.

3 Likes

Thanks Gerry. Will give this a whirl tomorrow. Does this mean I can only have dates sorted in the correct date order if they are in the US format (mm-dd-yyyy), rather than the UK format (dd-mm-yyyy)?

I believe Sasha configured and tested this today on your system for UK Format. I tested locally here yesterday in UK format.