Formatting Dates

ATTENTION: THIS IS OUR OLD SITE. TO SEE OUR NEW WEBSITE, CLICK HERE.

This code example shows how to format a date to DD/MM/YYYY for both individual and repeater display.
The following code formats a date of birth field to DD/MM/YYYY and displays it through a text field called txtBirthday. The formatting code is in the function formatFields(), which is called once the page and dbPeople dataset is ready. It checks if a date of birth is populated and hides the txtBirthday field if not. If the date of birth field is populated, then it formats the field as DD/MM/YYYY.
Please login or sign-up (it's free!) to view our code. Refresh the page if already logged in.
Disclaimer: To the best of our knowledge, this code works for its stipulated purpose. If you find an error in our code, or know of a better way to achieve the same result - please contact us! We will help where we can, however please be aware that the code is provided 'as is' and without a promise of support in using or implementing it.
  • Facebook Social Icon
© CorvidCodeBank