Help trying to extract date and time

Hello all,

In my database I have an entry saved as a text which is " 2024-03-15T13:55:00.000Z ".
I would like to get the month/day (03/15) and the time (13:55) to be displayed like that :
DAY/MONTH : 15/03 (Day and Month have been flipped around)
TIME : 13h55 ( " : " has been replaced by " h)

So like that : 15/03 at 13h55

Which Operators should I use to achieve that please ?

Many thanks :slight_smile:

Armand

When you refer to a date in an expression, click the ‘more’ button and select the :formatted as option, you can then change the way it is displayed on the page by selecting custom format.

image

image

Hey @LotoMaker64

Split your text by “T” and select the first item.

my_text :splited by T :first item

This will result in 2024-03-15

Now, you can split it again by “-” and select the :last item (will be “15”) and :item 2 (will be “03”).

So for the firs part you need to write something like this:

my_text :splited by T :first item :splited by - :last item / my_text :splited by T :first item :splited by - :item 2

:point_right: The result should be 03/15

For the second part, you will split your text by “T” and select the last item.

my_text :splited by T :last item

This will result in 13:55:00.000Z

Now you need to pick only the 5 initials letters and replace the ": " for “h”

The final code will be something like this:

my_text :splited by T :last item :truncated to 5 :find and replace

:point_right: The result should be 13h55

I didn’t test it, but I assume it is going to work :wink:

I can just say WHAOUHHHHH !! You ROCK !!! Thank you so much :slight_smile:

1 Like

‘Formatted as’ allows you to add letters…

image

@craig.morris Yes, but his data is not a Date. Is a Text.

Ahhh, apologies, my bad :+1:

1 Like