Sunday, January 8, 2012

Formatting dates with formulas

At some point you may need to format a date within a formula.   Below are a few examples to help you out.
23-Mar-2007

The following formula will do the trick:

Turn 11/02/2003 00:00:00 into 11-Feb-2003:
ToText({datetime_field}, "dd-MMM-yyyy")

Turn 11/02/2003 00:00:00 into Feb 11, 2003:
ToText({datetime_field} "MMM dd, yyyy")

Turn 11/02/2003 00:00:00 into 02/11/2003:
ToText({datetime_field},"MM/dd/yyyy") 

No comments:

Post a Comment