Format date

Let's look at the functions for formatting dates programmatically in Drupal 6 and 7. Basically, you can use the core format_date function or you can leverage the date module and use date_format_date. In theory, the latter is better because it uses a date object instead of a unix timestamp (and you don't have to worry about 2038 ;).  Here's a snippet using both functions in D 6/7.

Writing queries in Drupal 7

Read More »

About

This is the company blog of
Drupal specialist Merge.nl

We are located in Breda (Netherlands) and build websites using Drupal. More about us.

Content on this blog is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Netherlands License.

Creative Commons License

Recent Comments

Social