Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

How to Format Unix Time in Typo3 Using TypoScript and Fluid

Автор: vlogize

Загружено: 2025-10-06

Просмотров: 0

Описание:

Discover a step-by-step guide on formatting Unix timestamps into a human-readable date format in Typo3 using TypoScript and Fluid.
---
This video is based on the question https://stackoverflow.com/q/17521045/ asked by the user 'typo3job' ( https://stackoverflow.com/u/1645488/ ) and on the answer https://stackoverflow.com/a/63986720/ provided by the user 'Sonal' ( https://stackoverflow.com/u/8131078/ ) at 'Stack Overflow' website. Thanks to these great users and Stackexchange community for their contributions.

Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: typoscript date is tstamp from DB how to format

Also, Content (except music) licensed under CC BY-SA https://meta.stackexchange.com/help/l...
The original Question post is licensed under the 'CC BY-SA 3.0' ( https://creativecommons.org/licenses/... ) license, and the original Answer post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license.

If anything seems off to you, please feel free to write me at vlogize [AT] gmail [DOT] com.
---
How to Format Unix Time in Typo3 Using TypoScript and Fluid

When working with databases in Typo3, you might encounter Unix timestamps that need to be displayed in a more human-readable format on your forms, especially when using extensions like Powermail. If you've pulled a date from the database but it appears as a Unix time (like 1609459200), you may wonder how to format it. Let's explore how to transform that Unix timestamp into a friendly format such as %d %m %y, which will enhance the user experience.

Understanding the Problem

The typical database returns dates in a format that is not user-friendly. For instance, if you have a date field such as begin_date, the data might be stored as a Unix timestamp, which is the number of seconds since January 1, 1970. This format is great for calculations but not suitable for display. Your goal is to convert this timestamp into a format like 31 12 20, which reads as December 31, 2020.

Solution Overview

To achieve this, we’ll utilize TypoScript to pull the timestamp and then use Fluid to format that date into human-readable text. Below are the steps you'll take to set this up.

Step 1: Retrieve the Timestamp

You already have the TypoScript code that retrieves the timestamp from the database. Here is the relevant portion of your code:

[[See Video to Reveal this Text or Code Snippet]]

This snippet does the following:

Retrieves the timestamp from the database using the uid provided in the input (tx_seminars_pi1).

Wraps and inserts the data appropriately for display.

Step 2: Format the Timestamp with Fluid

To format the Unix timestamp to a human-readable date using Fluid, you can set up a dedicated Fluid section to handle the formatting logic. Here's how you can do it:

[[See Video to Reveal this Text or Code Snippet]]

Fluid Section Implementation

Below is a sample Fluid section that performs the date formatting:

[[See Video to Reveal this Text or Code Snippet]]

Step 3: Insert Your Variable in Fluid

Make sure to properly pass your date variable into the Fluid section by adjusting the arguments accordingly. The variable in this example is posting.datePosted. You'll need to adapt it to match your actual data source in Typo3.

Conclusion

Transforming Unix timestamps into a human-readable format doesn’t have to be a daunting task. With this guide, you have both the TypoScript and Fluid templates needed to achieve the desired formatting. By following these steps and ensuring your variables are correctly set, you can effectively improve the clarity of date displays in your Typo3 forms.

Now you're all set to make Unix timestamps user-friendly and engaging! Thank you for reading!

How to Format Unix Time in Typo3 Using TypoScript and Fluid

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

Иран. Как все кончится. Старый кремлевский телефон. Русский след.

Иран. Как все кончится. Старый кремлевский телефон. Русский след.

Хранилище данных против озера данных против хранилища данных | ETL, OLAP против OLTP

Хранилище данных против озера данных против хранилища данных | ETL, OLAP против OLTP

Как взломать любое программное обеспечение

Как взломать любое программное обеспечение

Я перестал пользоваться Google Поиском! Почему вам тоже стоит это сделать.

Я перестал пользоваться Google Поиском! Почему вам тоже стоит это сделать.

Удаляем свои фото, выходим из чатов, скрываем фамилию? Как избежать штрафов

Удаляем свои фото, выходим из чатов, скрываем фамилию? Как избежать штрафов

Как работала машина

Как работала машина "Энигма"?

Краткое объяснение больших языковых моделей

Краткое объяснение больших языковых моделей

Как сжимаются изображения? [46 МБ ↘↘ 4,07 МБ] JPEG в деталях

Как сжимаются изображения? [46 МБ ↘↘ 4,07 МБ] JPEG в деталях

Самый короткий тест на интеллект Задача Массачусетского профессора

Самый короткий тест на интеллект Задача Массачусетского профессора

Hack Pack – Введение в Arduino

Hack Pack – Введение в Arduino

Но что такое нейронная сеть? | Глава 1. Глубокое обучение

Но что такое нейронная сеть? | Глава 1. Глубокое обучение

Каково это — изобретать математику?

Каково это — изобретать математику?

Почему все ГЕРМЕТИЗИРУЮТ неправильно?

Почему все ГЕРМЕТИЗИРУЮТ неправильно?

Вихрь в магнитной мешалке

Вихрь в магнитной мешалке

Выходная головоломка Пошевели извилинами

Выходная головоломка Пошевели извилинами

Код работает в 100 раз медленнее из-за ложного разделения ресурсов.

Код работает в 100 раз медленнее из-за ложного разделения ресурсов.

Почему простые числа образуют эти спирали? | Теорема Дирихле и пи-аппроксимации

Почему простые числа образуют эти спирали? | Теорема Дирихле и пи-аппроксимации

Учебник по Excel за 15 минут

Учебник по Excel за 15 минут

Python Tutorial for Absolute Beginners #1 - What Are Variables?

Python Tutorial for Absolute Beginners #1 - What Are Variables?

Что происходит с нейросетью во время обучения?

Что происходит с нейросетью во время обучения?

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com