web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / DateTimeValue will not...
Power Apps
Unanswered

DateTimeValue will not set as GB?

(0) ShareShare
ReportReport
Posted on by 51

Hi,

 

I have the following code but when I do it through the powerapp on a mobile device or accessing it directly it works fine however when I access through a Sharepoint site, even though the region is set to English UK, it thinks the 5/1/2022 is June!

 

Set(
 selectedDate,
 Calendar_1.StartDate
);
Set(
 selectedEndDate,
 Calendar_1.EndDate
);
Set(
 startTime,
 DateTimeValue(Text(
 selectedDate,
 "dd/mm/yyyy"
 ) & " " & ddTimeFrom.Selected.Value
 )
);
Set(
 endTime,
 If(
 DateValue(
 Text(
 selectedEndDate,
 "dd/mm/yyyy"
 )
 ) < DateValue(
 Text(
 selectedDate,
 "dd/mm/yyyy"
 )
 ),
 DateTimeValue(
 Text(
 selectedDate,
 "dd/mm/yyyy"
 ) & " " & ddTimeTo.Selected.Value
 ),
 DateTimeValue(
 Text(
 selectedEndDate,
 "dd/mm/yyyy"
 ) & " " & ddTimeTo.Selected.Value
 )
 )
);

 

How do I get the startTime to stick to dd/mm/yyyy ??

 

Thanks

 

David

Categories:
I have the same question (0)
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @DavidMullett ,

    You can try with below Approach.

    You need to force the Variable also contains the Same formate you expect.

    LIke below - 

    Set(
     selectedDate,
     DateTimeValue(Calendar_1.StartDate,"dd/MM/yyyy")
    );
    Set(
     selectedEndDate,
     DateTimeValue(Calendar_1.EndDate,"dd/MM/yyyy")
    );

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#2
11manish Profile Picture

11manish 192

#3
Valantis Profile Picture

Valantis 128

Last 30 days Overall leaderboard