Convert date into number - Apache PIG
I don't use PIG, but from looking online I think you should be able to use the Replace function built into PIG.

Assuming your Date field is already a string:

Data_ID = FOREACH File GENERATE(int) REPLACE(Date,'-','');


Here's the reference if it's helpful: https://pig.apache.org/docs/r0.9.1/func.html#replace