@Nupur,
Please take a look at the thread below. I think it provides all the information you need to meet this requirement. Be sure to read all the way to the end of the thread, because each contributor added improvements to the original approach suggested.
I hope this is helpful.
– Brian