Date, Time and Numeric Filters in Data Bindings Formatter

October 1, 2013

Explore the date, time and numeric filters in Data Bindings Formatter

In this article we'll take a closer look at time and date filtering as well as the numeric one, packed in the HTML5 Data Bindings Formatter, coming tomorrow. With the date and time formatting you can determine how the date and time is going to be displayed or even do advanced date calculations with Date Add and Date Diff. The numeric filtering features a dozen of filters among which you'll find the currency filter that allows you to convert any number as currency. Check out the details below!

The Story

Date and Time Filtering

  • Date Add - Add a date part of the day. For example weeks-5 subtracts five weeks from the date.


  • Date Diff - Returns the difference between two dates. You can also choose a date interval from the drop down menu.
 
You can choose what part of the date difference you want to display. The number of days, months or weeks, but also maybe only the time difference in Hours:minutes format.
 


  • Format Date - Format a date using one of the many available masks.


Numeric  Filtering

  • Abs - Returns the absolute number.


  • Ceil - Rounds a number upwards to the nearest integer. 


  • Currency - Format a number as currency.


  • Floor - Rounds a number downwards to the nearest integer.


  • Format Number - Coverts a number into a string with the given number decimals.


  • Hex - Converts a hexadecimal string to a number.


  • Pad Number - Converts a number to a string with leading zeros.


  • Round - Rounds a number to the nearest integer.


  • To Number - Converts the input to a number.

Example:

For this example we applied the Ceil filter in order to round the price number upwards to the nearest integer and also the currency filter to convert the price in the proper currency, in our case $USD. The order date has a format date filter applied - dd mm yyyy.

HTML5 Data Bindings Formatter



Dreamweaver Design View 

 

Browser Preview

Before applying Celi, Currency and Format Date filters

 

After applying Celi, Currency and Format Date filters

 

Related Blog Posts

Lubov Cholakova

Lubov CholakovaLubov has been with DMXzone for 8 years now, contributing to the Content and Sales departments. She is bringing high quality content in the form of daily blog updates, reviews, tutorials, news, newsletters,update emails and extensions' manuals. If you have a product that needs publicity or any other questions about the entire DMXzone community, she is the one you can contact.

See All Postings From Lubov Cholakova >>

Comments

Be the first to write a comment

You must me logged in to write a comment.