'Format date with dax

I have dates like:

enter image description here

I need to do two transformations:

Convert it into datetime

field date and time in the initial data shows in GMT. Necessary translate into our local time as well as our working hours. Local time = time in Kyiv which also takes into account daylight saving time. Working hours = because we work 24/7, we take into account the beginning of each day not from 00:00, and from 7:25 am. That is, if the purchase was made on February 1 at 7:15, it has enroll until January 31. For the second point I used this function, how to midify it to respond to the requirement please?

let
Source = (datetimecolumn as datetime) =>

let
date = DateTime.Date(datetimecolumn),
time = DateTime.Time(datetimecolumn),
lastSundayOfOctober = Date.StartOfWeek(#date(Date.Year(date), 10, 31), Day.Sunday),
lastSundayOfMarch = Date.StartOfWeek(#date(Date.Year(date), 3, 31), Day.Sunday),

isSummerTime = (date = lastSundayOfMarch and time >= #time(2,0,0))
or
(date > lastSundayOfMarch and date < lastSundayOfOctober)
or
(date = lastSundayOfOctober and time <= #time(2,0,0)),
timeZone = 1 + Number.From(isSummerTime),
CET =
DateTime.From(date)
+ #duration(0,Time.Hour(time),Time.Minute(time),Time.Second(time))
+ #duration(0, timeZone, 0, 0)
in
CET
in
Source 2e


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source