cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alice23
Helper II
Helper II

Date Format doesn't work to sending in excel

Hello !

I created a button that send the data from a collection to an Excel file connected to OneDrive. The problem is, when I want to send something that it's DATE FORMAT, errors appears.

Below it's my code. Everythings works fine, until I add the Data_cand_marfa_este_RFD :Date_email[@Data_cand_marfa_este_RFD] row that is DATE FORMAT (09/02/2021)

 

 

ForAll(Date_email,
       Patch(Cerere_Excel,
               Defaults(Cerere_Excel),
               {Adresa :Date_email[@Adresa],
               Data_cand_marfa_este_RFD :Date_email[@Data_cand_marfa_este_RFD]





                
                    
               }
              )
      )
      

 

 

 

5 REPLIES 5
Nogueira1306
Super User
Super User

Hey!

 

Format date - time first

 

Nogueira1306_0-1630572843792.png

 

 

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!

PG_WorXz10
Community Champion
Community Champion

Hi @Alice23 ,

 

What is the error message your getting ?

Try 

 Text(
        DateValue,
        "yyyy-mm-ddThh:mm:ss"
    )

 

If it helps. 

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

@PG_WorXz10 @Nogueira1306 

Where should I write your code? Because [@Data_cand_marfa_este_RFD] is a column saved in a collection named Date_email, and the code (I think) should look like the code below:

Date_email[@Data_cand_marfa_este_RFD]

 

 Text(
        Date_email[@Data_cand_marfa_este_RFD],
        "yyyy-mm-ddThh:mm:ss"
    )

 

Write this before that ForAll. And, in the patch, write the name of the var instead

 

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!

Hi @Alice23 ,

 

The point is you will need to use Text format date time value in Excel worksheet, otherwise there could be a few problems. This is why we need to convert date time values to strings before patching to the worksheet.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,341)