Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datetime: allow date-only and time-only display #7049

Open
wvdvegte opened this issue Mar 14, 2025 · 2 comments
Open

Datetime: allow date-only and time-only display #7049

wvdvegte opened this issue Mar 14, 2025 · 2 comments

Comments

@wvdvegte
Copy link

What's your use case?
I don't know if this is at all possible, but when looking at daily patterns it sometimes makes sense to consider hh:mm:ss without considering yyyy:mm:dd preceding it. Currently, if my data contains time by specifying hh:mm:ss only, Orange assumes that this time is specified for 1970-01-01, so wherever the time appears in, for instance a data table, it is shown as 1970-01-01 hh:mm:ss.
For instance, I'm currently working on a tutorial on classification of people's presence in a room in order to provide predictions for a smart thermostat based on day of the week and time of the day, where at some point I split up the datetime in date and time.
It is annoying that I have to tell my students why this date 1970-01-01 is always there, and, also it is annoying having to deal with this unnecessarily space-consuming datetime expression in, for instance inequalities showing up in Tree Viewer.
Likewise, if only yyyy-mm-dd is specified, it is always assumed that the time is 00:00:00, which is then also displayed in all cases.
I vaguely remember this was different in the past but I'm not sure.

What's your proposed solution?
automatically disregard yyyy-mm-dd if it isn't specified, and also automatically disregard hh:mm:ss if it isn't specified.

Are there any alternative solutions?
In some cases, converting to a string using Formula, and removing the unneeded part helps for presentation purposes, but this won't work, for instance, in Tree Viewer.

@ales-erjavec
Copy link
Contributor

I vaguely remember this was different in the past but I'm not sure.

I think this might be a difference between File and CSV Import widget behavior.

@wvdvegte
Copy link
Author

Hmm, yes, not necessarily the widget but the file type matters. If I store my data as xlsx, the date 01-01-1970 is added to hh:mm:ss input. If I store it as csv, it remains hh:mm:ss. Even if I open it in the File widget. Strange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants