Good day,
How can I convert this value into a proper format for date and time,
this is the code I use
Thank you!
Solved! Go to Solution.
Ok, did not knew epoch format, but having that said, I was able to make it work 😀
Try this:
Note that I used Int()
Text( Int(ThisItem.creationDate), "[$-en-US]yyyy-mm-dd")
Hi there @bpplls ,
Was hard to understand what you want, but I think I get it now.
Try this one:
DateDiff(
ThisItem.creationDate,
Now()
) & " days ago"
Let me know if it worked out for you and don't forget to "Accept as solution" as well as give the Kudos if this helped you out!! 😀
It doesn't change anything. I cannot seem to format the ThisItem.creationDate
You want to show only the number of days, right?
If so, don't use the Text() to format the date, just use the field itself to do the math.
If I'm not undestanding what you need please give us some more information on the field and components you are using
I have an custom connector that returns a creationDate that I use in a gallery
I want first to format the ThisItem.creationDate value into a more accurate format like mm-dd-yyyy, not like its default value "1662626..."
then after formatting the value, that's the time I will compute the days between ThisItem.creationDate to present date. Tha'ts why I'm using this code.
Are you sure that date is correct in the source or in the connector?
It is common to have Dates in Serial Number format but, for example, the serial date number for 1/1/2020 is 43831 as this is the number of days since 1/1/1900. So is somehow weird that you have such a different (and so much bigger) number.
Yup, it is correct. I also tried converting it using other website converter and this is how it shows
Ok, did not knew epoch format, but having that said, I was able to make it work 😀
Try this:
Note that I used Int()
Text( Int(ThisItem.creationDate), "[$-en-US]yyyy-mm-dd")
WOAH!! Thank you very much for this, I didn't know we can use the "Int" part for the time and date format. Been reading a lot of documentations of powerapps about transforming numbers to time and date but I didn't read that we can use "Int".
Thank you so much! You're awesome! God bless
GREAT !! This one was not that easy but happy to help 😀
User | Count |
---|---|
253 | |
125 | |
106 | |
50 | |
49 |