cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VD
Helper III
Helper III

Convert Number to Date

I am trying to convert Number to Date Time.

 

I am fetching data from SQL Server and Date column is type of number and I want to make it as Date in PowerApps.

 

SQL Server Date column values,

21540101 000000.000

20210527 124903.000

 

Expected result in PowerApps,

01/01/2154 000000.000

27/05/2021 124903.000

 

How can I do this?  

1 ACCEPTED SOLUTION

Accepted Solutions
CNT
Super User
Super User

@VD 

This will give you the date in PA

Date(Value(Left(yourDate,4).Text), Value(Mid(yourDate,5,2).Text),Value(Mid(yourDate,27,2).Text))

 

View solution in original post

4 REPLIES 4
CNT
Super User
Super User

@VD 

This will give you the date in PA

Date(Value(Left(yourDate,4).Text), Value(Mid(yourDate,5,2).Text),Value(Mid(yourDate,27,2).Text))

 

VD
Helper III
Helper III

@CNT , Thanks for help.

CNT
Super User
Super User

@VD Glad to help!

 

Please remember to give a 👍 and accept the solution as it will help others in the future.

CNT
Super User
Super User

@VD If you problem is solved,

 

Please remember to give a 👍 and accept the solution as it will help others in the future.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,033)