Heyho,
I have already seen a few posts from others who also have problems with date formatting in formulas, just like me.
I have the following example that shows how awkward it can be to have a DateTime formula field in the CET time zone with summer winter time formatting and German month formatting.
I thought I’d share this here and am curious to hear any comments, improvements, or discussions about it. Looking forward to your thoughts!
If(
Month([Test Date]) = 1,
"Jan",
If(
Month([Test Date]) = 2,
"Feb",
If(
Month([Test Date]) = 3,
"Mär",
If(
Month([Test Date]) = 4,
"Apr",
If(
Month([Test Date]) = 5,
"Mai",
If(
Month([Test Date]) = 6,
"Jun",
If(
Month([Test Date]) = 7,
"Jul",
If(
Month([Test Date]) = 8,
"Aug",
If(
Month([Test Date]) = 9,
"Sep",
If(
Month([Test Date]) = 10,
"Okt",
If(
Month([Test Date]) = 11,
"Nov",
If(Month([Test Date]) = 12, "Dez", "Unknown")
)
)
)
)
)
)
)
)
)
)
) +
" " +
ToText(Day([Test Date])) +
", " +
ToText(Year([Test Date])) +
" " +
If(
If(
Today() >= DateTime(Year(Today()), 3, 26, 2, 0, 0) and
Today() < DateTime(Year(Today()), 10, 29, 3, 0, 0),
Hour([Test Date] + Hours(2)),
Hour([Test Date] + Hours(1))
) < 10,
"0",
""
) +
ToText(
If(
Today() >= DateTime(Year(Today()), 3, 26, 2, 0, 0) and
Today() < DateTime(Year(Today()), 10, 29, 3, 0, 0),
Hour([Test Date] + Hours(2)),
Hour([Test Date] + Hours(1))
)
) +
If(
Minute([Test Date]) != 0,
":" +
If(
Minute([Test Date]) < 10,
"0" + ToText(Minute([Test Date])),
ToText(Minute([Test Date]))
),
""
) +
" Uhr"
output example: “Feb 10, 2024 10 Uhr”