YearMoDate format for folderDAT

I’m looking for a user readable alternative to epoch time that is still sortable. This would be possible if time module was imported by default with time.ctime, or some other tdu module method to do such, but it would be nice to not get into script dat territory for this

went to post this today and found my own old RFE from '21. Bump! Would love format=“%Y.%m.%d.%H.%M.%S%f”

as an option so that i can actually get relevant data and not sort be weekedays

Hey Vincent, by using the mod class you can use any module from the Python standard library in (parameter) expressions everywhere in TD.

See example attached which converts epoch column from a Folder DAT to %Y.%m.%d.%H.%M.%S using an Evaluate DAT
convert_epoch_using_mod.tox (1.2 KB)

I’m doing that already to parse my table, but that doesn’t help me when I need to see date created in my sortable table lister; I must Sophie’s choice between seeing the proper time and accurately sorting. I could have some function rewrite the whole table every time there’s a change or something, but this seems like a reasonable enough request, and even best default setting for dates

First, I totally agree with wanting Ymd everywhere, as it is the only format stopping insanity :wink:

But I don’t understand the Sophie’s choice - my example tox shows Table DAT with proper time and is fully sortable as the included Sort DAT demonstrates?

I guess the thing is everybody wants a slightly different format - for example I would not choose a format with dots in it like you prefer, others dont want frame number, or prefer time in 12hour format etc. Hard to find one format to which the whole world agrees - but epoch is superstandard and you can use it as a simple base to parse to any desired format.

your workaround definitely gets the job done, maybe even more elegantly than my scriptDAT shenanigans, but this is something i keep finding myself wanting and it seems like a logical inclusion hence the RFE. Maybe best solution would be a baked in datetime option, with a string field so that the user can parse this info with whichever formatting they prefer

it seems like a standard enough inclusion, and there’s probably a lot of users that wouldn’t be familiar enough to jump through strftime hoops that would benefit from the addition of a standard include proper sortable date

1 Like