Click or drag to resize

IFieldFormat Property

Data type-specific format specification instructing the field on how to display its data and how to parse a value out of user entered text. Most standard .Net formatting is supported and formatting is locale-appropriate. Additional formatting specifications are provided to extend those provided by .Net. Examples Here

Namespace:  NetQuarry.Data
Assembly:  EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntax
string Format { get; set; }

Property Value

Type: String
Examples

Examples of common format specifications are:

Dates and times

  • d -- (default) short date format by user's DateCulture
  • D -- long date format by user's DateCulture
  • t -- short time format by user's DateCulture
  • T -- long time format by user's DateCulture
  • f -- full date short time format separated by space
  • F -- full date long time format by user's DateCulture
  • g -- short date short time separated by space
  • G -- short date long time separated by space
  • + -- (modifier when appended to base format) will add date description relative to today (e.g. "3/5/13 (Tomorrow)").

Currency

  • c -- (default) standard currency with standard subunits per field's currency type (e.g. $100.00)
  • c0 -- standard currency, per field's currency type, with no subunit digits (e.g. $100)
  • c* -- standard currency, per field's currency type, with any number of subunit digits according to user entry (e.g. $100.125)
  • w -- in words (e.g. "one hundred dollars")
  • W -- in words, title case (e.g. "One Hundred Dollars")

Integer

  • d -- (default) typical integer formatting per user's NumberCulture
  • p -- typical percentage formatting per user's NumberCulture, e.g. 5% means 0.05 (.Net standard)
  • % -- (modifier with p, as "p%") convert to a percentage, e.g. 5% means 5, not 0.05
  • w -- in words (e.g. 137 as "one hundred thirty-seven")
  • W -- in words, title case (e.g. 137 as "One Hundred Thirty-Seven")
  • 0x -- hexadecimal (e.g. 48 as "0x00000030")

Floating point

  • f -- (default) typical floating point formatting per user's NumberCulture
  • p -- typical percentage formatting per user's NumberCulture, e.g. 5% means 0.05 (.Net standard)
  • % -- (modifier with p, as "p%") convert to a percentage, e.g. 5% means 5, not 0.05
See Also