in https://rntlab.com/module-10/esp32-lora-receiver-part-3/ following two lines are written:
#include <NTPClient.h> formattedDate = timeClient.getFormattedDate();
I get the following Error: ‘class NTPClient’ has no member named ‘getFormattedDate’
If I replace timeClient.getFormattedDate() with timeClient.getFormattedTime()
there is no Error, but only time.
In the Keywords getFormattedTime is listed, but not getFormattedDate.
Do I need also #include NTPTimeClient.h ?
Thanks for your help
You’re using the wrong NTPClient library. Can you please remove your current library and install this NTPClient library forked that also has the date?
I’m using the library forked by Taranais, because it comes with the date method:
formattedDate = timeClient.getFormattedDate();
I was in France for some time with no access to internet.
Back home I used your solution and it worked. Thanks!
It’s not helpfull for users, if different libraries with the same name exist. A solution may be NTPClient_t (for taranis) and NTPClient_w (for Weinberg), but this is out of our influence.
Thanks for letting me know and I’m glad you made it worked! I’ll point anyone having the same problem to this thread.
The location https://github.com/taranais/NTPClient library at this location has the Keywords file getFormattedTime is listed, but not getFormattedDate. Has the library been changed or updated.??
@Murray Bold, you need to use the Taranais NTP Client library: https://github.com/taranais/NTPClient
Even though, it doesn’t have the getFormattedDate listed in the keywords file that function is available in that library.
Hello Rui and other posters Peter and Murray,
At some moment several sketches of me using NTPClient did not compile anymore, where they did this summer.
Luckily I found your blogs.
My sketches did compile in the past. I was not aware that I used the “Taranais-version” of NTPClient, but that should have been so.
I guess the libaries-update utility of the Arduine IDE had overwritten at some moment in the short past the Taranais-version with the Weinberg. So I replaced the Weinberg by the Taranais.
How we can prevent such happen again?