# How to get real date and time from dataset?

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-real-date-and-time-from-dataset/104750>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [April 6, 2025, 8:42am UTC](https://forum.inductiveautomation.com/t/how-to-get-real-date-and-time-from-dataset/104750 "2025-04-06T08:42:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![zixi\_zhou](https://avatars.discourse-cdn.com/v4/letter/z/3be4f8/32.png) [@zixi\_zhou](https://forum.inductiveautomation.com/u/zixi_zhou)\
**Post date:** [April 6, 2025, 8:42am UTC](https://forum.inductiveautomation.com/t/how-to-get-real-date-and-time-from-dataset/104750/1 "2025-04-06T08:42:17Z")

</div>

Hi，I try to read date and time from PLC, and I get a dataset,below:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/a/aa8f28b09e5e83d1e07b4d4289677656756dabd7.png)  
how can I show real date and time on ignition?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 6, 2025, 8:45am UTC](https://forum.inductiveautomation.com/t/how-to-get-real-date-and-time-from-dataset/104750/2 "2025-04-06T08:45:41Z")

</div>

1. What make and model of PLC?
2. Can you provide a link to the user manual and a page reference for the date format?
3. Can you show your PLC tag configuration?

---

<div class="post-metadata">

**Author:** ![zixi\_zhou](https://avatars.discourse-cdn.com/v4/letter/z/3be4f8/32.png) [@zixi\_zhou](https://forum.inductiveautomation.com/u/zixi_zhou)\
**Post date:** [April 6, 2025, 8:47am UTC](https://forum.inductiveautomation.com/t/how-to-get-real-date-and-time-from-dataset/104750/3 "2025-04-06T08:47:41Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/7/57d0e7d77989a0a4d2e0df1c4649a1fd40783730.png)  
This tag type is Date\_And\_Time.  
I use siemens 1518F

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 6, 2025, 8:56am UTC](https://forum.inductiveautomation.com/t/how-to-get-real-date-and-time-from-dataset/104750/4 "2025-04-06T08:56:49Z")

</div>

2: No link?  
4: Can you show the Ignition tag configuration?

---

<div class="post-metadata">

**Author:** ![zixi\_zhou](https://avatars.discourse-cdn.com/v4/letter/z/3be4f8/32.png) [@zixi\_zhou](https://forum.inductiveautomation.com/u/zixi_zhou)\
**Post date:** [April 6, 2025, 9:00am UTC](https://forum.inductiveautomation.com/t/how-to-get-real-date-and-time-from-dataset/104750/5 "2025-04-06T09:00:47Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/1/c1512ca1e1d86e6623ec404ec49b0a12a83b1cb6.png)

---

<div class="post-metadata">

**Author:** ![zixi\_zhou](https://avatars.discourse-cdn.com/v4/letter/z/3be4f8/32.png) [@zixi\_zhou](https://forum.inductiveautomation.com/u/zixi_zhou)\
**Post date:** [April 6, 2025, 9:03am UTC](https://forum.inductiveautomation.com/t/how-to-get-real-date-and-time-from-dataset/104750/6 "2025-04-06T09:03:46Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/3/a38c730c00a7af15d881b46383884763ef3807a7.png)  
I get this fault ,if I change type to datetime

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 6, 2025, 9:10am UTC](https://forum.inductiveautomation.com/t/how-to-get-real-date-and-time-from-dataset/104750/7 "2025-04-06T09:10:39Z")

</div>

There's a 32-post long thread started in 2012 on the topic.

- There are some script conversions to extract the date.
- There is an Expression Language conversion in post #27 for "the old Siemens Date\_AndTime" datatype to a string (usually a bad idea but could be modified to give a timestamp).
- There seems to be a simple solution in post #31, March 2024.

> [@SIEMENS Driver DATE\_AND\_TIME values](https://forum.inductiveautomation.com/t/siemens-driver-date-and-time-values/5198/32):
>
> There are one or two of the date/time types that are available over OPC UA with no fuss. I forget which ones... I can check in a bit. edit: use LDT in the PLC, it gets exposed via the Siemens OPC UA Server as an OPC UA DateTime value.

---

<div class="post-metadata">

**Author:** ![zixi\_zhou](https://avatars.discourse-cdn.com/v4/letter/z/3be4f8/32.png) [@zixi\_zhou](https://forum.inductiveautomation.com/u/zixi_zhou)\
**Post date:** [April 6, 2025, 9:40am UTC](https://forum.inductiveautomation.com/t/how-to-get-real-date-and-time-from-dataset/104750/8 "2025-04-06T09:40:03Z")

</div>

It work, Thank you very much!

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 6, 2025, 9:43am UTC](https://forum.inductiveautomation.com/t/how-to-get-real-date-and-time-from-dataset/104750/9 "2025-04-06T09:43:57Z")

</div>

Good. Don't forget to mark "Solution" on my post #8.
