# Date/time formatting

**URL:** https://discourse.notenik.app/t/date-time-formatting/267
**Category:** Questions
**Tags:** confirmed
**Created:** [July 23, 2023, 3:23pm UTC](https://discourse.notenik.app/t/date-time-formatting/267 "2023-07-23T15:23:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ErikMH](https://discourse.notenik.app/user_avatar/discourse.notenik.app/erikmh/32/66_2.png) [@ErikMH](https://discourse.notenik.app/u/ErikMH)
#### Post date: [July 23, 2023, 3:23pm UTC](https://discourse.notenik.app/t/date-time-formatting/267/1 "2023-07-23T15:23:57Z")

</div>

I like that I can pre-populate a date field in a note with today’s date via the collection (or class) template, but I’m struggling to see how to format it instead as a date-time. The most likely syntax I could think of for the template is:

```
Date: today("yyyy-mm-dd HH:mm")

```

but that just gives me `yyyy-mm-dd` without the `HH:mm`.

I’ve also tried other variations, such as these:

```
Date: yyyy-mm-dd HH:mm
Date: <today "yyyy-mm-dd HH:mm">
Date: today&yyyy-MM-dd HH:mm

```

but nothing seems to do the trick.

If anyone else does this, could you share the magic incantation? Thank you!

---

<div class="post-metadata">

### Author: ![hbowie](https://discourse.notenik.app/user_avatar/discourse.notenik.app/hbowie/32/6_2.png) [@hbowie](https://discourse.notenik.app/u/hbowie)
#### Post date: [July 23, 2023, 3:50pm UTC](https://discourse.notenik.app/t/date-time-formatting/267/2 "2023-07-23T15:50:30Z")

</div>

Can you give me a bit more context in terms of your use case here? There are [System Assigned Dates and Times](https://notenik.app/knowledge-base/EPUB/html/system-assigned-dates-and-times.html) available, if that’s what you’re interested in.

---

<div class="post-metadata">

### Author: ![ErikMH](https://discourse.notenik.app/user_avatar/discourse.notenik.app/erikmh/32/66_2.png) [@ErikMH](https://discourse.notenik.app/u/ErikMH)
#### Post date: [July 23, 2023, 4:43pm UTC](https://discourse.notenik.app/t/date-time-formatting/267/3 "2023-07-23T16:43:02Z")

</div>

Sure, and thank you for asking!

The system-assigned dates aren’t ideal, because they aren’t editable and their formats include the offset from UTC and they don’t show up in standard (non-streamlined reading).

I’d prefer a generic date (date-time) field that is overrideable but that will by default be pre-populated with the current date and time in the ISO 8601 format that one can get manually with the first _Paste Date…_ option:

![Screenshot 2023-07-23 at 12.38.30](https://discourse.notenik.app/uploads/db0641/original/1X/04c5d97521368d6b07c45881dbaf02b94fde6ca7.png)

I can of course do this manually, but I’d like the value to already be present, since 98% of the time I wouldn’t need/want to override it.

I hope that’s clearer!

---

<div class="post-metadata">

### Author: ![hbowie](https://discourse.notenik.app/user_avatar/discourse.notenik.app/hbowie/32/6_2.png) [@hbowie](https://discourse.notenik.app/u/hbowie)
#### Post date: [July 25, 2023, 8:37pm UTC](https://discourse.notenik.app/t/date-time-formatting/267/4 "2023-07-25T20:37:49Z")

</div>

Try out the [new beta](https://discourse.notenik.app/t/beta-version-12-5-4-available-for-testing-on-july-25th-2023/272), and use the value of `now` instead of `today`, and let me know how that works out for you.
