Yes you can take an EKG to see if you've had a heart attack since the EKG is capable of telling whether you've had a previous heart attack and an EKG can also tell whether your chest pain was caused by reduced blood flow to the heart.
An EKG can also detect whether a heart attack is in progress.