Hi,
I have a canvas power app that writes to a sql azure back end.
The column in the table is called QuoteSent and is of type Datetimeoffset(7)
In the power app i have a DatePickerCanvas of format short and date time zone set to local (I am in Sydney Australia). To get the time I am using a Text Input Canvas where I type a 24 hour format time like 13:45
In my patch statement I have tried all manner of things but just cant get it right as far as writing the correct utc time to the table. It seems like the utc conversion is happening twice.
Code so far is inside a with statement.
Would be very grateful to get this going.
Thanks in Advance
Todd
 
With(
                                            {
                                                qsLocal: DatePickerCanvas1_5.SelectedDate + TimeValue(TextInputCanvas4_1.Value)
                                            },
                                            With(
                                                {
                                                    qt: Patch(
                                                        tblQuotes,
                                                        Defaults(tblQuotes),
                                                        {
                                                            
                                                            QuoteSentDate: If(IsBlank(qsLocal), Blank(), DateAdd(qsLocal, TimeZoneOffset(qsLocal), TimeUnit.Minutes))
                                                            
                                                        }
                                                    )
                                                },
                                                //copy to here
                                                If(
                                                    IsError(qt) || CountRows(Errors(tblQuotes)) > 0,
                                                    Notify("Quote could not be created.", NotificationType.Error, 4000);
                                                    Reset(DatePickerCanvas1_5);
                                                    Reset(DatePickerCanvas4_1);
                                                    Notify(" Quote Added Successfully", NotificationType.Success, 2000);
                                                    //Navigate(Screen1)
                                                )
                                            )
                                        )
Categories:
 
                            
                            
                            
                            
                            
                            
                            
                            
                                I have the same question (0)
                            
                            
                            
                            
                        
                        
                     
		

 Report
Report All responses (
 All responses ( Answers (
 Answers (