Hello
I have code to delete the excel file
but i want code it date after 10/10/2019 then my code will run
also can i get the date from popular websites like time.is ? to avoid user change system date?
Thanks
Hello
I have code to delete the excel file
but i want code it date after 10/10/2019 then my code will run
also can i get the date from popular websites like time.is ? to avoid user change system date?
Thanks
So what is your current code?
To get time from some site, you can use free API's that's out there.
Ex: Using WorldTimeApi...
This will return response in json format. You can use text manipulation/pattern matching etc to extract the info you need.Please Login or Register to view this content.
EDIT: FYI - qStr is the time zone. By adding .txt at end of timezone string, you can obtain response in plain text. Which may be easier to parse in VBA.
Link to API documentation for url used in above.
http://worldtimeapi.org/
Last edited by CK76; 09-04-2019 at 09:52 AM.
?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
― Robert A. Heinlein
Here's sample that checks if current date matches some date.
Note that you should change qStr to your local timezone (or user's). And adjust DateSerial as well.
Please Login or Register to view this content.
Thanks i will test it now, but in this point
If CDate(Left(x, 10)) = DateSerial(2019, 9, 4) Then
i want if date move after 10/10/2019 Then... i will paste my code
i think its now if its = 4/9/2019
Like I stated. Change DateSerial(2019, 9, 4) to what ever the date you need it to be.
Or use cell value if you want.
Thanks work
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks