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

Chaning Date Type

Dear All,

 

I have and date column in SP list as order date. I would like to make it as yymmdd into a single line text column in my SP list.

 

How can i do it powerapps? I tried to check the source on the net but could not manage to do it so.

 

Thanks

3 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @Ogun_ustun ,

Please consider set the Default property of the OrderDateforTON Text Box to following:

Text(OrderDatePicker.SelectedDate, "yymmdd")

Note: The OrderDatePicker represents the DatePicker control within the Order Date data card, please replace it with actual control name

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

The right answer is what I stated earlier.  if it a DatePicker the change it to;

Text(DatePickerName.SelectedDate,"yymmdd")

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Hi @Ogun_ustun ,

Is the second solution I provided above helpful in your solution?

 

If the second solution I provided above could achieve your needs, please consider go ahead to click "Accept as Solution" to identify my reply as solution.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
eka24
Super User
Super User

If it in a Gallery, use:

Text(Thisitem.DateColumn,"yymmdd")

 

If a Textbox

Text(DateColumn.Text,"yymmdd")

------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

v-xida-msft
Community Support
Community Support

Hi @Ogun_ustun ,

Do you want to save the date value in "yymmdd" format back to corresponding Single Line Text column for each record in your SP list?

 

Based on the needs that you mentioned, I think the ForAll function and Patch function could achieve your needs. Please consider take a try with the following workaround:

Create a Blank canvas app, add your SP list as data source in this app, add a Button in this app, set the OnSelect property to following formula:

 

ForAll(
       RenameColumns('Your SP List', "ID", "ID1"),
       Patch(
             'Your SP List',
             LookUp('Your SP List', ID = ID1),
             {
              SingleTextTypeColumn: Text('Order Date', "[$-en-US]yymmdd")
             }
       )
)

 

Note: The 'Order Date' represents the Date type column in your SP list.

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@eka24, unfortunately, it did not work. Single text data card does not accept the formula on default menu. 

@v-xida-msfti did not understand how i will proceed this with a button. Please find the screenhot below:

 

What i want to do:

-User selects order date

- Automatically  "orderdateforton" single text becomes "yyddmm"

- Once user saves the form, all data appears on SP list.

I will proceed to concatenate some columns to create ref no by using powerautomate.

Can you please check it again?

 

2020-05-08 08_21_59-Transport Order Creation Tool - Saved (Unpublished) - Power Apps.png

Hi @Ogun_ustun ,

Please consider set the Default property of the OrderDateforTON Text Box to following:

Text(OrderDatePicker.SelectedDate, "yymmdd")

Note: The OrderDatePicker represents the DatePicker control within the Order Date data card, please replace it with actual control name

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The right answer is what I stated earlier.  if it a DatePicker the change it to;

Text(DatePickerName.SelectedDate,"yymmdd")

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @Ogun_ustun ,

Is the second solution I provided above helpful in your solution?

 

If the second solution I provided above could achieve your needs, please consider go ahead to click "Accept as Solution" to identify my reply as solution.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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