Atozed Forums

Full Version: Indy Whois client Delphi 10.3.3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello
how can I get the expiry date of a domain name using IdWhois ?
I don't want to get the full whois data but only the expiry date
Best regards
(02-06-2021, 02:29 PM)Mohammed Wrote: [ -> ]how can I get the expiry date of a domain name using IdWhois ?

Your same question on StackOverflow was already answered:

https://stackoverflow.com/a/66078878/65863

Quote:You can't: the WHOIS protocol stores data in a human-readable format, which is why you only have text and can't specifically query a date and then even get it in a non-text type.

Parse the text yourself: find the line that matches most of what you expect, then convert the date from text into your favorite datatype. Expect WHOIS results that have no or an empty expiry line.