diff --git a/login_security.admin.inc b/login_security.admin.inc
index 57fc523..cf4ecaa 100644
--- a/login_security.admin.inc
+++ b/login_security.admin.inc
@@ -76,19 +76,37 @@ function login_security_admin_settings() {
     '#default_value' => variable_get('login_security_notice_attempts_available', LOGIN_SECURITY_NOTICE_ATTEMPTS_AVAILABLE),
     '#description' => t('Checking this option, the user is notified about the number of remaining login attempts before the account gets blocked. Security tip: If you enable this option, try to not disclose as much of your login policies as possible in the message shown on any failed login attempt.'),
   );
+  $date_format = array();
+  $format_types = system_get_date_types();
+  foreach ($format_types as $key => $value) {
+    $date_format[$key] = $value['title'];
+  }
   $form['login_messages']['login_security_last_login_timestamp'] = array(
     '#type' => 'checkbox',
     '#title' => t('Display last login timestamp'),
     '#description' => t('Checking this option, when a user successfully logs in, a message will display the last time he logged into the site.'),
     '#default_value' => variable_get('login_security_last_login_timestamp', 0),
   );
+  $form['login_messages']['date_format_last_login'] = array(
+    '#type' => 'select',
+    '#title' => t('Date Format'),
+    '#description' => 'Select date format.',
+    '#options' => $date_format,
+    '#default_value' => variable_get('date_format_last_login', 'long'),
+  );
   $form['login_messages']['login_security_last_access_timestamp'] = array(
     '#type' => 'checkbox',
     '#title' => t('Display last access timestamp'),
     '#description' => t('Checking this option, when a user successfully logs in, a message will display the last site access with this account.'),
     '#default_value' => variable_get('login_security_last_access_timestamp', 0),
   );
-
+  $form['login_messages']['date_format_last_access'] = array(
+    '#type' => 'select',
+    '#title' => t('Date Format'),
+    '#description' => 'Select date format.',
+    '#options' => $date_format,
+    '#default_value' => variable_get('date_format_last_access', 'long'),
+  );
   $form['login_messages']['login_security_user_blocked_email_user'] = array(
     '#type' => 'textfield',
     '#title' => t('Select who should get an email message when a user is blocked by this module'),
diff --git a/login_security.module b/login_security.module
index 01b9b5d..d152115 100644
--- a/login_security.module
+++ b/login_security.module
@@ -269,16 +269,18 @@ function login_security_validate($form, &$form_state) {
  * Implements hook_sumbit().
  */
 function login_security_submit($form, &$form_state) {
+  $login_format = variable_get('date_format_last_login', 'long');
+  $access_format = variable_get('date_format_last_access', 'long');
   // The submit handler shouldn't be called unless the authentication succeeded.
   if (user_is_logged_in()) {
     $login = _login_security_login_timestamp();
     if (variable_get('login_security_last_login_timestamp', 0) && $login > 0) {
-      drupal_set_message(t('Your last login was @stamp.', array('@stamp' => format_date($login, 'large'))), 'status');
+      drupal_set_message(t('Your last login was @stamp.', array('@stamp' => format_date($login, $login_format))), 'status');
     }
 
     $access = _login_security_access_timestamp();
     if (variable_get('login_security_last_access_timestamp', 0) && $access > 0) {
-      drupal_set_message(t('Your last page access (site activity) was @stamp.', array('@stamp' => format_date($access, 'large'))), 'status');
+      drupal_set_message(t('Your last page access (site activity) was @stamp.', array('@stamp' => format_date($access, $access_format))), 'status');
     }
   }
 }
