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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
stribor45
Post Prodigy
Post Prodigy

Passing variable in API JSON body String

I want to place the current datetime as my ending date in my JSON String but having some trouble passing the actual variable inside the string

 

// This is my current time

currentDate = DateTime.ToText(DateTime.LocalNow(), "MM/dd/yyyy hh:mm:00 tt")

 {
      ""name"": ""VideoCallTime"",
      ""operator"": ""between"",
      ""value"": [

        ""2023-08-01T00:00:00Z"",
        "&currentDate&"
      ]
 },

I looked at some other post and couldnt get and concatination mentioned in those post working.

 

any suggestions?

 

Thanks

1 ACCEPTED SOLUTION
stribor45
Post Prodigy
Post Prodigy

This worked for me

 

""" & currentDate & """

 

View solution in original post

1 REPLY 1
stribor45
Post Prodigy
Post Prodigy

This worked for me

 

""" & currentDate & """

 

Helpful resources

Announcements
December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.