Top "Formatting" questions

The process of transforming text or data for presentation.

Quickly getting to YYYY-mm-dd HH:MM:SS in Perl

When writing Perl scripts I frequently find the need to obtain the current time represented as a string formatted as …

perl datetime formatting timestamp
Number format in excel: Showing % value without multiplying with 100

When I set format of a cell as %, it automatically multiply the value with 100 & show the value. So 5.66 becomes 566 %. …

formatting excel-2007 excel-2010 excel-2013
How to round up integer division and have int result in Java?

I just wrote a tiny method to count the number of pages for cell phone SMS. I didn't have the …

java math types formatting
how do I print an unsigned char as hex in c++ using ostream?

I want to work with unsigned 8-bit variables in C++. Either unsigned char or uint8_t do the trick as …

c++ formatting ostream
How to Customize the time format for Python logging?

I am new to Python's logging package and plan to use it for my project. I would like to customize …

python datetime logging formatting
Best timestamp format for CSV/Excel?

I'm writing a CSV file. I need to write timestamps that are accurate at least to the second, and preferably …

excel formatting csv timestamp
How can I String.Format a TimeSpan object with a custom format in .NET?

What is the recommended way of formatting TimeSpan objects into a string with a custom format?

c# .net string time formatting
JSON formatter in C#?

Looking for a function that will take a string of Json as input and format it with line breaks and …

c# json formatting
Turn off auto formatting in Visual Studio

I'm a code purist, preferring my own style of code formatting as opposed to Visual Studio's default settings. I've turned …

visual-studio visual-studio-2008 formatting code-formatting
Formatting floats without trailing zeros

How can I format a float so that it doesn't contain trailing zeros? In other words, I want the resulting …

python formatting floating-point pretty-print