LocalDateTime to DateTime
时间: 2023-10-14 08:07:32 浏览: 160
LocalDate和Date的相互转化
In C#, you can convert a LocalDateTime object to a DateTime object using the following code:
```
LocalDateTime localDateTime = LocalDateTime.Now;
DateTime dateTime = localDateTime.ToDateTime();
```
The ToDateTime() method of the LocalDateTime object returns a DateTime object with the same date and time values.
阅读全文