Top "Format" questions

It may refer to text formatting, content format, file format, document file format, etc.

How can I pretty-print JSON in a shell script?

Is there a (Unix) shell script to format JSON in human-readable form? Basically, I want it to transform the following: { "…

json unix command-line format pretty-print
How do I display a decimal value to 2 decimal places?

When displaying the value of a decimal currently with .ToString(), it's accurate to like 15 decimal places, and since I'm using …

c# .net format decimal
.NET String.Format() to add commas in thousands place for a number

I want to add a comma in the thousands place for a number. String.Format()?

c# .net string format
How to use java.String.format in Scala?

I am trying to use a .format method of a string. But if I place %1, %2, etc. in the string, java.…

java string scala format
How to nicely format floating numbers to String without unnecessary decimal 0?

An 64-bit double can represent integer +/- 253 exactly Given this fact I choose to use a double type as a …

java string floating-point format double
How to format date and time in Android?

How to format correctly according to the device configuration date and time when having a year, month, day, hour and …

android date time formatting format
Formatting a number with leading zeros in PHP

I have a variable which contains the value 1234567. I would like it to contain exactly 8 digits, i.e. 01234567. Is there …

php numbers format
How to format date in angularjs

I want to format date as mm/dd/yyyy. I tried the following and none of it works for me. …

angularjs date format date-format datefilter
Convert one date format into another in PHP

Is there a simple way to convert one date format into another date format in PHP? I have this: $old_…

php date datetime format date-conversion