# LocalDateTime.fromDateTime constructor

LocalDateTime.fromDateTime(

1. DateTime dateTime

)

Creates a LocalDateTime from a Dart DateTime instance.

### Example:

    final dartNow = DateTime.now();
    final customNow = LocalDateTime.fromDateTime(dartNow);

A date-time object without a timezone, composed of a LocalDate and LocalTime.

This class represents a specific moment on a calendar, combining a date and time without referencing any timezone. It is immutable and supports arithmetic and comparison operations.

### Example:

    final dateTime = LocalDateTime.of(2024, 12, 31, 23, 59);
    print(dateTime); // 2024-12-31T23:59:00

## Implementation

    factory LocalDateTime.fromDateTime(DateTime dateTime) {
      return LocalDateTime(
        LocalDate.fromDateTime(dateTime),
        LocalTime.fromDateTime(dateTime),
      );
    }