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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
LeonanPerks
New Member

Use current date in text format "dd/mm/yyyy", in a connection via API

Hello, I'm making a request in an API, but one of the parameters is the current date.

Currently, the query is done as follows.

 

let
    body = Json.FromValue([
        call = "****",
        app_key = app_key,
        app_secret = app_secret,
        param = {
            [
                nPage = 1,
                nRegPerPage = 300,
                dDataPosicao="09/03/2023",
                cDisplayAll = "N",
                code_local_stock = 0
            ]
        }
    ]),
    header = [
        #"Content-Type" = "application/json"

    ],
    request = Json.Document(Web.Contents("https://*******************"), 1252)
in
    request


I need dDataPosicao="09/03/2023", to update to the current date, in this format.





1 REPLY 1
wdx223_Daniel
Super User
Super User

DateTime.ToText(DateTime.LocalNow(),"dd/MM/yyyy")

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors