Difference between revisions of "Date field"

From EPrints Documentation
Redirect page
Jump to: navigation, search
(Redirected page to API:EPrints/MetaField/Date)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
#REDIRECT [[API:EPrints/MetaField/Date]]
 +
 +
{{fieldtypes}}
 +
__NOTOC__
 +
 +
== Inheritance ==
 +
 
* [[Metadata]]
 
* [[Metadata]]
 
** [[Date field]]
 
** [[Date field]]
 
  
 
== Description ==
 
== Description ==
Line 27: Line 33:
  
 
None.
 
None.
 +
 +
== Database ==
 +
 +
Date fields are stored in the database as:
 +
 +
fieldname_year SMALLINT, fieldname_month SMALLINT, fieldname_day SMALLINT
 +
 +
If a date only has a year value then it would be stored as 1998,NULL,NULL
 +
 +
== API ==
 +
 +
Date values are represented in the API as scalars containing ISO encoded dates. eg.
 +
 +
"1976"
 +
"1976-02"
 +
"1976-02-02"
 +
 +
== Searching ==
 +
 +
Date fields can be searched as either single values or ranges. Searching for "2006" will also match 2006-12-25. You can search for "2000-" to search dates in or after 2000. Or "2000-12-2003-01" for December 2000 through January 2003.

Latest revision as of 14:25, 11 April 2012