Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AHM
Helper I
Helper I

Sello de tiempo hasta la fecha

Buenos días a todos!!!

Una simple, estoy recibiendo esta marca de tiempo y necesito cambiarla a la fecha:

Sello de tiempo:1551876131000+0100

Fecha humana: 06/03/2019 9:07:00

Todo listo tengo en una columna esta parte: #datetime(1970,1,1,0,0,0) pero no estoy seguro de cómo avanzar

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

@AHM

Creo que lo tengo. probar una columna personalizada (modo PPower Query Editor)

a) si tiene una marca de tiempo de formato como 1551876131000+0100

= #datetime(1970,1,1,0,0,0)+#duration(0,0,0,Number.RoundDown(Number.FromText(Text.BeforeDelimiter([Time Stamp],"+"))/1000))

b. si tiene una marca de tiempo de formato como 1583766096983

= #datetime(1970,1,1,0,0,0)+#duration(0,0,0,Number.FromText([Time Stamp])/1000)


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

6 REPLIES 6
az38
Community Champion
Community Champion

@AHM

¿cuál es el punto de partida para esta marca de tiempo. no se parece a la hora Unix


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hola

No estoy seguro de lo que quieres decir con Start point, obtuve este resultado de una API: /Date(1551876131000+0100)/ y al usar la columna dividida obtuve: 1551876131000+0100

En el documento API pude encontrar estas líneas que pueden ayudar a responder a la pregunta:

Json

"DateAndTime":"/Fecha(1583766096983)//

Xml

<DateAndTime>2020-03-09T15:01:36.983976Z</DateAndTime>

¿Te ayudas?

az38
Community Champion
Community Champion

@AHM

Creo que lo tengo. probar una columna personalizada (modo PPower Query Editor)

a) si tiene una marca de tiempo de formato como 1551876131000+0100

= #datetime(1970,1,1,0,0,0)+#duration(0,0,0,Number.RoundDown(Number.FromText(Text.BeforeDelimiter([Time Stamp],"+"))/1000))

b. si tiene una marca de tiempo de formato como 1583766096983

= #datetime(1970,1,1,0,0,0)+#duration(0,0,0,Number.FromText([Time Stamp])/1000)


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Funcionó perfectamente!!!

Ok, a menos que me equivoque, es una marca de tiempo Unix en milisegundos. Esto significa que el punto de partida es el 1 de enero de 1970. Podrías usar las medidas rápidas que publiqué, sólo tienes que dividir el valor por 1000 primero.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Super User
Super User

¿Qué clase de marca de tiempo es esa, unix?

Tal vez esto: https://community.powerbi.com/t5/Quick-Measures-Gallery/Unix2UTC-and-UTC2Unix/m-p/620012#M292


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.