//

2687
3
Jump to solution
05-22-2017 09:28 AM
_____
by
New Member
0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

Since it is a JS Date object, you can use any of the various methods that are on Date. JavaScript Date Reference 

There are probably many ways to go about doing it. Maybe you could get the timezone offset, subtract that from the original milliseconds since epoch that is returned, and then construct a new date from that value? JavaScript getTimezoneOffset() Method 

View solution in original post

3 Replies
LucasDanzinger
Esri Frequent Contributor

If the Date field is actually of Date data type, then it should accept just a regular JS Date object. However, the function you reference above returns a string. Can you see if just passing in a new Date works?

new Date()

There is a discussion in the Qt doc about how a JS Date is equivalent to a QDateTime, which is what we use internally - Data Type Conversion Between QML and C++ | Qt QML 5.8 

_____
by
New Member

//

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Since it is a JS Date object, you can use any of the various methods that are on Date. JavaScript Date Reference 

There are probably many ways to go about doing it. Maybe you could get the timezone offset, subtract that from the original milliseconds since epoch that is returned, and then construct a new date from that value? JavaScript getTimezoneOffset() Method