Top "Formatting" questions

The process of transforming text or data for presentation.

How to format numbers as currency string?

I would like to format a price in JavaScript. I'd like a function which takes a float as an argument …

javascript formatting currency
Convert a date format in PHP

I am trying to convert a date from yyyy-mm-dd to dd-mm-yyyy (but not in SQL); however I don't know how …

php date formatting
Change date format in a Java string

I've a String representing a date. String date_s = "2011-01-18 00:00:00.0"; I'd like to convert it to a Date and …

java string date formatting date-format
How to print a number with commas as thousands separators in JavaScript

I am trying to print an integer in JavaScript with commas as thousands separators. For example, I want to show …

javascript formatting numbers integer
Show a number to two decimal places

What's the correct way to round a PHP string to two decimal places? $number = "520"; // It's a string from a database $…

php formatting numbers rounding number-formatting
Convert java.util.Date to String

I want to convert a java.util.Date object to a String in Java. The format is 2010-05-30 22:15:52

java date formatting java.util.date
How to prettyprint a JSON file?

I have a JSON file that is a mess that I want to prettyprint. What's the easiest way to do …

python json formatting pretty-print
Format JavaScript date as yyyy-mm-dd

I have a date with the format Sun May 11,2014. How can I convert it to 2014-05-11 using JavaScript? The …

javascript date formatting date-format
std::string formatting like sprintf

I have to format std::string with sprintf and send it into file stream. How can I do this?

c++ string formatting stdstring c++-standard-library
Format date and time in a Windows batch script

In a Windows (Windows XP) batch script I need to format the current date and time for later use in …

windows datetime formatting batch-file