Epilepsy is a neurological disorder that affects approximately fifty million people according to the World Health Organization. While electroencephalography (EEG) plays important roles in monitoring the brain activity of patients with epilepsy and diagnosing epilepsy, an expert is needed to analyze all EEG recordings to detect epileptic activity. This method is obviously time-consuming and tedious, and a timely and accurate diagnosis of epilepsy is essential to initiate antiepileptic drug therapy and subsequently reduce the risk of future seizures and seizure-related complications. In this study, a convolutional neural network (CNN) based on raw EEG signals instead of manual feature extraction was used to distinguish ictal, preictal, and interictal segments for epileptic seizure detection. We compared the performances of time and frequency domain signals in the detection of epileptic signals based on the intracranial Freiburg and scalp CHB-MIT databases to explore the potential of these parameters. Three types of experiments involving two binary classification problems (interictal vs. preictal and interictal vs. ictal) and one three-class problem (interictal vs. preictal vs. ictal) were conducted to explore the feasibility of this method. Using frequency domain signals in the Freiburg database, average accuracies of 96.7, 95.4, and 92.3% were obtained for the three experiments, while the average accuracies for detection in the CHB-MIT database were 95.6, 97.5, and 93% in the three experiments. Using time domain signals in the Freiburg database, the average accuracies were 91.1, 83.8, and 85.1% in the three experiments, while the signal detection accuracies in the CHB-MIT database were only 59.5, 62.3, and 47.9% in the three experiments. Based on these results, the three cases are effectively detected using frequency domain signals. However, the effective identification of the three cases using time domain signals as input samples is achieved for only some patients. Overall, the classification accuracies of frequency domain signals are significantly increased compared to time domain signals. In addition, frequency domain signals have greater potential than time domain signals for CNN applications.