web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch date and time Pi...
Power Apps
Answered

Patch date and time Picker collection (offline) to SharePoint list (datetime format)

(0) ShareShare
ReportReport
Posted on by 30

Hi,

My App works in offline mode. One of the forms has a picker date (date and time in separated fields) and stores in a temp Collection. When it's sync with server (internet connection) I'm trying to Patch coltempDate and coltempTime to SharePoint list (the single datetime field), but it's not working.

I tried lots of formats but it just store properly in SP if I Patch only the date: Patch(ListSP, {}, { 'Visit Date': DateValue(coltempDate) }.

What I need is to Patch this Colletion field "coltempDate" + "coltempTime" in SP datetime field.

Any help, pls?

Categories:
  • Sunil-Narnaware Profile Picture
    681 on at

    @tg42q15f how are you capturing the values of date & time in coltempDate & coltempTime? and what is rationale behind using two separate collections?

    Also you should be seeing an error DateValue(coltempDate) as it expects text value and not the table value..? can you check this as well?

  • tg42q15f Profile Picture
    30 on at

    Hi @Suni ,

    In the "Save button" of the forms, I pick the date and time as follow:

    Collect(colTemp, { tempDtVisita: DateValueDtVisita.SelectedDate, // date from datePicker

                                 tempHrVisita: HourValueHrVisita.SelectedText, // hour from timePicker

                                 tempHrMiVisita: MinuteValueMiVisita.SelectedText // minute from timePicker

                                }

    Then I save it locally (SaveData function) and Load when there's connection. In the synch button I'm trying to get those temp items and Patch to the SP list which has the 'Visit Date' Datetime type. At this point, I only able to send the date without the hour and minute...

  • Verified answer
    tg42q15f Profile Picture
    30 on at

    Now I realized the mistake... in the first Patch (get data from the PickerDate field) I shouldn't have separeted Date collection item from hour colletion item... I did the following inside the Patch:

    tempDtVisita: DateValueDtVisita.SelectedDate + Time( Value(HourValueHrVisita.Selected.Value),
    Value(HourValueHrVisita.Selected.Value), 0)

    Now, in the Patch to sync all the data I just used SP_item: tempDtVisita, and worked perfeclty!

    By the way... I was trying to complicate the simple :))

    Thank you man!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard