Will a journal get an impact factor if it gets indexed in Clarivate analytics-Web of science core collection? And if yes, then how long does it take for the journal to get an impact factor from the date of indexing?
Being indexed in Web of Sciences does not mean that the journal has an impact factor. Some indexed journals do not have an IF. Considering how impact factors are calculated, at least two years are needed before a journal can get an impact factor. (It does not mean that any journal must get an IF after two years). A journal can be indexed for years but still no IF.
You can read this page for more information on the topic: https://clarivate.com/webofsciencegroup/essays/impact-factor/
It depends on which indexing you talk about. Clarivate’s WoS core collection contains several databases: https://clarivate.com/webofsciencegroup/solutions/web-of-science-core-collection/ The ‘only’ ones indexing journals with an impact factor are SCIE and SSCI.
Journals indexed in ESCI are eligible for being indexing in these two databases (and are then assigned an impact factor), but as indicated by Marius Baguma how long it takes (if ever) is pretty unpredictable.
Besides the Web of Science Core Collection, certain specialty collections exist like Biological Abstracts, BIOSIS Previews and Zoological Record. This can be a good sign but does not necessarily means indexed in ESCI, SCIE or SSCI.
Be aware that some journals ‘proudly’ mention indexed in WoS while they are ‘only’ indexed in Zoological Record or even worse (mostly predatory journals) they refer to so-called misleading metrics like Scientific Journal Impact Factor (SJIF), International Scientific Indexing (ISI) etc. see for more info: https://beallslist.net/misleading-metrics/