Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
For a report I have to use a link into the meter name. I have been able to crack down the id aspect of the link. but the date on such link is quite off to the date/time formats in PBI.
&chartEndDate=2023-01-10T19%3A00%3A00.000Z
This is how the date is formatted in the link
And this is how the date time format is in the column I have:
Relief date (same as chartEndDate in link)
10/01/2023 5:30:00pm.
For the link to work I'd need to have the column be in the same way as the link so this should be in the column instead of the above:
2023-01-10T19%3A00%3A00.000Z
TIA
Solved! Go to Solution.
Do you need something like this? This formula uses the UTCNOW() function to get the current UTC time and the FORMAT function to format the datetime in the desired format. You can replace UTCNOW() function with the column you have.
Column = CONCATENATE(
FORMAT(UTCNOW(), "yyyy-MM-ddT"),
SUBSTITUTE(
FORMAT(UTCNOW(), "HH:mm:ss.fffZ"),
":",
"%3A"
)
)
Proud to be a Super User!
Hi! This one is much closer but I'm experiencing issues with some rows. It seems it doesn't work for all the dates I have
@Amazing_Random
Can you include both columns with the original date and the new formatted date?
Do you need something like this? This formula uses the UTCNOW() function to get the current UTC time and the FORMAT function to format the datetime in the desired format. You can replace UTCNOW() function with the column you have.
Column = CONCATENATE(
FORMAT(UTCNOW(), "yyyy-MM-ddT"),
SUBSTITUTE(
FORMAT(UTCNOW(), "HH:mm:ss.fffZ"),
":",
"%3A"
)
)
Proud to be a Super User!
Yours was very close, I had managed to convert the date into the yyyy-mm-ddTHH:mm:ss format so I just needed ti use:
SUBSTITUTE(
FORMAT(Column, "YYYY-mm-ddTHH:mm:ss.fffZ"),
":",
"%3A"
Thanks for the help!
does that mean you want to convert "2023-01-10T19%3A00%3A00.000Z " to "10/01/2023 5:30:00pm"?
Proud to be a Super User!
The opposite! I need to convert "10/01/2023 5:30:00pm" to "2023-01-10T19%3A00%3A00.000Z " for the link to work
Edit: I understand the hours are different, just an example
could you pls explain the converting logic?
the first part before T is easier to understand. How about the part after letter T?
Proud to be a Super User!
Sure! So after T should be the hour, then minutes, then seconds, as for html, apparently time is written like that, with %3A being the substitute for ":" I hope this helps.
is 000Z a fixed ending?
Proud to be a Super User!
Yes it is the Timezone I believe
Ok I formatted the date to:
2023-01-10T17:30:00
However, the timezones are different, the URL is using England's Time Zone (GMT) and I'm in (GMT+13), I also have to add the '.000Z' at the end, which should be the GMT timezone code in url
pls check if this is what you want
Column 2 =
VAR _y=mid('Table'[column],7,4)
VAR _m=mid('Table'[column],4,2)
VAR _d=left('Table'[column],2)
VAR _a=find(":",'Table'[column],1)
VAR _h=if(right('Table'[column],2)="pm", mid('Table'[column],12,_a-12)+12,"0"&mid('Table'[column],12,_a-12))
VAR _min=left(right('Table'[column],7),2)
VAR _s=left(right('Table'[column],4),2)
return _y&"-"&_m&"-"&_d&"T"&_h&"%3A"&_min&"%3A"&_s&".000Z"
Proud to be a Super User!
It says
"The search Text provided to function 'FIND' could not be found in the given text"
could you pls provide some sample data?
Proud to be a Super User!
I'm afraid I cannot because it is some sensitive data from my company.
Column =
VAR _t1 =
LEFT ( [datetime], SEARCH ( "T", [datetime], 1 ) - 1 )
VAR _t2 =
SUBSTITUTE ( _t1, "-", "|" )
RETURN
DATE ( PATHITEM ( _t2, 1, INTEGER ),
PATHITEM ( _t2, 3, INTEGER ),
PATHITEM ( _t2, 2 , INTEGER )
)

I think you did it the wrong way,it is supposed to be the opposite
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 70 | |
| 45 | |
| 43 | |
| 36 | |
| 23 |
| User | Count |
|---|---|
| 196 | |
| 125 | |
| 105 | |
| 77 | |
| 56 |