In British English the day is usually put before the month. If you wish, you can add the ending of the ordinal number. The preposition of before the month is usually dropped. You can put a comma before the year, but this is not common anymore in British English.
Example: 5(th) (of) October(,) 2004
In American English the month is usually put before the day. If you wish, you can put the definite article before the day. It is common to write a comma before the year.
Example: October (the) 5(th), 2004
You can also write the date by using numbers only. The most common forms are:
Example: 5/10/04 or 5-10-04