Chapter

Date Formatter Module

Date Formatter Module

This module formats a date-time value. News feeds format their dates and times in different ways. Sometimes you need to format the different dates and times to match the same format. This is where the Date Formatter Module in Yahoo Pipes comes in handy.

A wide range of date-time formats called “specifiers” are available. The specifiers all begin with a percent sign followed by a character. These specifiers are what Yahoo Pipes uses to determine the date-time format. If you are familiar with PHP, you’ll recognize that the same specifiers are used there too.

The Date Formatter Module formats dates unlike the Date Builder Module that creates dates.

Lets take a look at a quick example by wiring in the date “March 8, 2010” through a Text Input Module and change it to the date-time format of “03/08/10”. We’re going to use the specifier “%D” to accomplish this.

Date Formatter Module

with the Date Builder Module and specifier %D becomes…

Date Formatter Module

This table outlines some of the common specifiers and their date-time output for the date-time March, 8 2010 2:00pm:

Specifier Formatted Date
%m-%d-%Y 03-08-2010
%A, %b %d, %y at %I:%M %p Monday, Mar 08, 10 at 02:00 PM
%D 03/08/10
%R 14:00
%B March

View the complete Date Specifiers Chart.

0 Comments ↓

No comments yet.

Leave a Reply