-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Weird error when using into datetime #13280
Copy link
Copy link
Closed
Labels
A:datetime-handlingSemantics and implementation of the datetime/duration types and commandsSemantics and implementation of the datetime/duration types and commandsstatus:needs-triageAn issue that hasn't had any proper lookAn issue that hasn't had any proper look
Milestone
Description
Describe the bug
I get a weird error when I try to convert into a specific date:
"09.02.2024 11:06:11" | into datetime --format '%d.%m.%Y %T'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
How to reproduce
run:
"09.02.2024 11:06:11" | into datetime --format '%d.%m.%Y %T'Expected behavior
- convert to datetime (this should work?)
- if there is really a problem, show an error message that is understandable
Screenshots
No response
Configuration
| key | value |
|---|---|
| version | 0.94.2 |
| major | 0 |
| minor | 94 |
| patch | 2 |
| branch | |
| commit_hash | |
| build_os | linux-x86_64 |
| build_target | x86_64-unknown-linux-gnu |
| rust_version | rustc 1.78.0 (9b00956e5 2024-04-29) (gentoo) |
| cargo_version | cargo 1.78.0 |
| build_time | 2024-06-05 16:16:58 +02:00 |
| build_rust_channel | release |
| allocator | mimalloc |
| features | default, sqlite, system-clipboard, trash, which |
| installed_plugins | bin_reader |
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:datetime-handlingSemantics and implementation of the datetime/duration types and commandsSemantics and implementation of the datetime/duration types and commandsstatus:needs-triageAn issue that hasn't had any proper lookAn issue that hasn't had any proper look