Steps to reproduce
- create a base
- Either use the “this.file.ctime” property, or create a datetime property that has a different format than the default, such as the ISO8601 with seconds and offset, for example: “2025-10-14T20:54:08-03:00”
- create a formula field
- Try to convert the datetime field to a number using the formula “number(date(someTimestamp))”
Did you follow the troubleshooting guide? [Y/N] - Y
The issue still happens even on a brand new, sandboxed vault.
Expected result
From the docs: The number() function should output a number of ms of the timestamp since the unix epoch.
Actual result
If the timestamp field follows the format “YYYY-MM-DDTHH:MM”, I get the expected result. For fields with something different, like the ISO format with seconds and offset (example: 2025-08-07T15:01:27-03:00), it outputs nothing.
(this is the formula I’m using)
Environment
SYSTEM INFO:
Obsidian version: v1.9.14
Installer version: v1.8.7
Operating system: Windows 11 Pro 10.0.26100
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
Additional information
I understand that at this moment the bases function is not supposed to work with arbitrary formats, but in the docs themselves the expected format is different than the one that works.
date()
Thedatestring should be in the formatYYYY-MM-DD HH:mm:ss
I think that at least the ISO format string comes up frequent enough that it should be accepted by default (it already seems to, though incomplete). It would also be nice if the date() function accepted a second parameter, for the user to set any arbitrary format string to parse. For example: in vault, I sometimes deal with data from different countries, which use different time formats, like DD/MM/YYYY and MM/DD/YYYY. I would rather not edit the inputs directly before importing the data, and being able to tell Obsidian how to parse each case would be very helpful.

