Questions tagged [custom-formatting]
84 questions
52
votes
7 answers
How would I separate thousands with space in C#
Assume I have the following decimal number that I have to format so that every thousand should be separated with a space:
897.11 to 897.11
1897.11 to 1 897.11
12897.11 to 12 897.11
123897.11 to 123 897.11
I have tried Decimal.ToString("0…

Mikayil Abdullayev
- 12,117
- 26
- 122
- 206
32
votes
3 answers
How can I manage units in pandas data?
I'm trying to figure out if there is a good way to manage units in my pandas data. For example, I have a DataFrame that looks like this:
length (m) width (m) thickness (cm)
0 1.2 3.4 5.6
1 7.8 9.0 …

ajwood
- 18,227
- 15
- 61
- 104
23
votes
3 answers
SSRS custom number format
I am go to generate an excel file from SSRS, and
I want to format the number like this...
15 is displayed as 15
14.3453453 is displayed as 14.35
12.1 is displayed as 12.1
0 is displayed as 0
1 is displayed as 1
I can apply this in Excel but unable…

K.C
- 287
- 1
- 2
- 10
19
votes
3 answers
How to write a custom formatter for Google DataTables (for use on visualisation api)
I'm looking to format my data in which I replace numbers with icons.
As far as I can tell Google do not currently have a formatter to do so:
http://code.google.com/apis/chart/interactive/docs/reference.html#formatters
There is a brief mention within…

Alex KeySmith
- 16,657
- 11
- 74
- 152
11
votes
3 answers
In an Atom package, how do I style patterns in a grammar?
I want to create a very simple custom atom package where I highlight specific words based on regular expressions. I am working with configuration files dealing with lots of ip addresses. I want to color ip address 1.1.1.1 red for example, 0.0.0.0…

Tono Nam
- 34,064
- 78
- 298
- 470
11
votes
2 answers
TimeSpan ToString "[d.]hh:mm"
I trying to format a TimeSpan to string.
Then I get expiration from MSDN to generate my customized string format.
But it don't words. It returns "FormatException".
Why? I don't understand...
var ts = new TimeSpan(0, 3, 25, 0);
var myString =…

riofly
- 1,694
- 3
- 19
- 40
8
votes
1 answer
In an Atom package, how do I overllap patterns in a grammar?
I want to go further and style more things. For example I will like to style the following:
setting1 = 4
setting2 = 192.168.1.12
etc...
I will like to style everything to the left of the = blue and everything to the right purple.
The problem is…

Tono Nam
- 34,064
- 78
- 298
- 470
7
votes
2 answers
.Net DataVisualization.Charting Formatting values on Y-Axis
Does anybody know how to format and control the values shown on the Y-Axis of a .Net 4 DataVisualization.Charting chart?
I have values on the Y-Axis and dates on the X-Axis. The values on the Y-Axis are showing multiple decimal points and I want to…

Guy
- 65,082
- 97
- 254
- 325
6
votes
3 answers
parsing a string into int/long using custom format strings
In C#.Net, here's a simple example of how to format numbers into strings using custom format strings:
(example taken from: http://www.csharp-examples.net/string-format-int/)
String.Format("{0:+### ### ### ###}", 447900123456); // "+447 900 123…

R D
- 521
- 5
- 12
4
votes
1 answer
How do I efficiently forward the formatting arguments when implementing a formatter for a custom type
I am trying to write a custom formatter to help me print vectors. I am attempting to maintain the format specifiers so that each item in the vector is formatted the same way.
I have taken most of my inspiration from this tutorial, and the…

Troyseph
- 4,960
- 3
- 38
- 61
4
votes
1 answer
How to create a cucumber-java custom formatter to get cucumber tags
I have a cucumber project and I want to get al the tags in the project to be able to choose them as parameters.
I found this question where cucumber had an option to get the tags but I found that doesn't work anymore, then I found this other…

Ana Franco
- 1,611
- 3
- 24
- 43
3
votes
1 answer
Google sheet formula =$G1=
I am trying to go get the conditional formatting to color the entire line, based on a text answer.
I have used "custom formula is" and =$G1=TRUE before, where I have a tickbox, so I tried to change the formula to =$G1=JA but this did not work.
I…

Majken
- 31
- 2
3
votes
1 answer
Client side validation of a timespan on asp.net mvc 3
I need to receive some time information in the format "hh:mm" (no seconds). The property is defined like this:
[DataType(DataType.Time), DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = @"{0:hh\:mm}")]
public TimeSpan SomeTimeProperty…

Fernando
- 4,029
- 1
- 26
- 35
2
votes
1 answer
Using Custom Login Form (Vaadin Components with Spring Security/ROO
I have completed setting up Spring Security using the roo shell as a guide and it has generated several views, amongst them is the login.jspx. I am trying to create a custom login form using Vaadin's Visual editor and Eclipse, how can i redirect the…

Warz
- 7,386
- 14
- 68
- 120
2
votes
1 answer
Excel custom format seconds as dd:hh:mm:ss but hide leading zero values
Is there an Excel custom format string that will show seconds in a dd:hh:mm:ss format, but hiding any leading zero values?
E.g., it is straightforward to format 100,000 s in dd:hh:mm:ss as 01:03:46:40. However, for 50,000 seconds I would like to…

DavidWalker
- 336
- 1
- 8