Display issue with Datetime after CSV import

Hi,

I have a CSV file with a datetime field formatted as follows - 08/01/2023 09:37:00

I selected Datetime as the field type and the import runs fine and shows the date time correctly -

but when it is displayed on the screen it shows as milliseconds

How can I correct this?

Thanks
Steve

What did you mean “displayed on the screen”? Did you use UI builder?

Hi,

I mean when I run the page in preview the time is displayed in milliseconds rather that mm-dd-yyyy hh:mm:ss and yes, I used UI Builder.

Steve

Okey, then your logic should have blocks that will convert millisecond into some readable time format.

Hi,

This is text block that resides in a repeater block so I am not sure how to run any changes on it before it is displayed. The content logic is tied to the Log Repeater data.

Steve

You could get the repeater item data, and it will refer in each text block to needed repeater item. Just try to print it and you will see.

Also I’m highly recommend to watch at least this playlists:

Ok,

I have watched the videos but it does not address my issue. I can get the data on to the page and if I use the print command above it does convert it to the correct date time format, but that is in the Inspection Console.

How do I get the conversion done on the page? I can store the date/time in a variable but how do I get it to be displayed in the text block seeing that the text block value is tied to the repeater block data?

2024-11-18 11 40 32

Steve

Hello @Steve,

For the text block to display data after it has been modified, you need to return these values from the Content Logic handler, like this:

Regards,
Alexander

1 Like

Thanks. Will give that a try.

Steve