cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ralph_C
New Member

PowerApp - Converting Date serial number to short date format in textbox

Hi, i have a sharepoint list that has date serial numbers. Need help how to convert the number to a short date format in a text box

This is what i have at the moment

Text(LookUp('Listname',Column_name =Item_No, Date),"mm/ddyyyy")

 

Thank you for the help.

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @Ralph_C 

This should hopefully work for you:

Text( 
     DateAdd(Date(1900,1,1), 
          LookUp('OTC CoE - LPA Schedule Slots Tracker',Slot_Number ="Slot 1").Date -2 , 
          Days
      ), 
     "mm/dd/yyyy"
)

 

timl_0-1638010174571.png

 

View solution in original post

8 REPLIES 8
Nogueira1306
Community Champion
Community Champion

Text( DateTimeValue( LookUp('Listname',Column_name =Item_No).Date, "mm/dd/yyyy" )

 

Try that

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

Thanks for the quick reply. unfortunately, no text was returned.

here's my actual code

Text( DateTimeValue( LookUp('OTC CoE - LPA Schedule Slots Tracker',Slot_Number ="Slot 1").Date, "mm/dd/yyyy" ))

Try just this:

Text( DateTimeValue( LookUp('OTC CoE - LPA Schedule Slots Tracker',Slot_Number ="Slot 1").Date))

Plus, make sure that your lookup is not empty

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

Hi Nogueira1306,

Appreciate you working with me on this.

I tried the code it returned something but was not the correct date. let me add some context

- The user will need to select a slot using a button, then once selected it should retrieve the value from the 'Date' column from SP

- using 'Slot 1' as lookup ref, the value 44522 should be returned (for Nov 22, 2021)

- wanted to convert the 44522 to 11/22/2021

 

Thanks

 

44522 is a date??

I am not understanding nothing..

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

i was hoping that would be the case. To convert the Date serial number used in Excel to a short date.
(also, sorry 44522 is Nov 22 not Nov 1)

 

https://support.microsoft.com/en-us/office/datevalue-function-df8b07d4-7761-4a93-bc33-b7471bbff252

refer to the remarks section.

timl
Super User
Super User

Hi @Ralph_C 

This should hopefully work for you:

Text( 
     DateAdd(Date(1900,1,1), 
          LookUp('OTC CoE - LPA Schedule Slots Tracker',Slot_Number ="Slot 1").Date -2 , 
          Days
      ), 
     "mm/dd/yyyy"
)

 

timl_0-1638010174571.png

 

View solution in original post

Amazing! that worked so well. Thank you so much.

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,420)