You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: nu::shell::cant_convert
× Can't convert to could not parse as datetime using format '%d.%m.%Y %T'.
╭─[entry #14:1:25]
1 │ "09.02.2024 11:06:11" | into datetime --format '%d.%m.%Y %T'
· ──────┬──────
· ╰── can't convert input is not enough for unique date and time to could not parse as datetime using format '%d.%m.%Y %T'
╰────
help: you can use `into datetime` without a format string to enable flexible parsing
Activity
fdncred commentedon Jul 1, 2024
Agreed. That error message is terrible.
I think the problem is that converting to datetime requires a timezone.
kaathewisegit commentedon Jul 1, 2024
Was about to post this. The
parse_from_strmethod fails without a timezone. What's weird is thatinto datetimeusesCantConverterror for some reason.Also, in theory,
into datetimecan useNaiveDateTimefor this. After all, it's already defaulting to the current timezone when inferring the format:hqsz commentedon Jul 3, 2024
I agree with upper opinions! i make simple PR to resolve this issue. I will receive a review on the direction of this patch.
Support default offset with dateformat option (nushell#13289)