diff --git a/crates/nu-command/src/conversions/into/record.rs b/crates/nu-command/src/conversions/into/record.rs index 6290739060..445d81cb86 100644 --- a/crates/nu-command/src/conversions/into/record.rs +++ b/crates/nu-command/src/conversions/into/record.rs @@ -93,6 +93,9 @@ impl Command for SubCommand { "hour" => Value::test_int(22), "minute" => Value::test_int(10), "second" => Value::test_int(57), + "millisecond" => Value::test_int(0), + "microsecond" => Value::test_int(0), + "nanosecond" => Value::test_int(0), "timezone" => Value::test_string("+02:00"), })), }, @@ -187,6 +190,9 @@ fn parse_date_into_record(date: DateTime, span: Span) -> Value { "hour" => Value::int(date.hour() as i64, span), "minute" => Value::int(date.minute() as i64, span), "second" => Value::int(date.second() as i64, span), + "millisecond" => Value::int(date.timestamp_subsec_millis() as i64, span), + "microsecond" => Value::int((date.nanosecond() / 1_000 % 1_000) as i64, span), + "nanosecond" => Value::int((date.nanosecond() % 1_000) as i64, span), "timezone" => Value::string(date.offset().to_string(), span), }, span,