You can try your own way first.And for converting the time to melliseconds.Just use the get mellis block in the clock component.If you are wondering how to get the date and time as an instant so you can use them with this block, so you will find as well a block named make instant from parts.
Can you tell us how is this api works?Any what is your way exactly.you mean you will set the api to get data for a specific instant.Or you we will get data every 3 months? So we can help you better.Also have you tried your way?Does it work?
But does the API accept date as parameters for filtering historical dates? I did not understand.
From what you said, the API only returns the last 3 months, so I guess you can’t filter by date as this is done internally in the API.
Is this better than working with milliseconds?
Looking here, it is safer to do the calculation for milliseconds because I don’t have to worry about whether the day of the month exists or not, for example.
So there is no way.you can try to add them in a for loop so you can get them with the least amount of blocks And you can use makeMellis block to convert a normal instance ( you get from make instance from parts block ) to mellis.
I’m working around an API limitation.
I will convert the current moment to milliseconds and then subtract 3 months from each request I make.
So I will take the history of the time I want back, making one request after another.
Now I don’t know exactly how I’m going to convert the date to LONG.
Do you mean the way of getting the data 3 monthes by 3 monthes.I can make it with this way.
for each number from 90 to ( the number of days you want the counter to stop on for example 182 (that means that we will get the data of the last 6 months 3 by 3) by 90
you will now form your request.In the start days parameter set it to number - 90 and the end day to the number.that’s it! now get data from the api with this url you have.
But I will have to do the math in milliseconds, because that’s how the api works.
I will use the Get Millis block of the Clock component for this and make an account to subtract 3 corresponding months in milliseconds.