Difference between revisions of "Updating Dates or Times with Pandora"

From SmartWiki
Jump to: navigation, search
Line 1: Line 1:
 
Dates are stored in the [[SmartSimple]] database in the following format:
 
Dates are stored in the [[SmartSimple]] database in the following format:
 
'''yyyy-mm-dd'''
 
'''yyyy-mm-dd'''
 +
 +
Accordingly when updating date fields with Pandora the submitted data must be formatted identically.
 +
  
 
==Standard Fields==
 
==Standard Fields==
  
The ''startdate'' and ''enddate'' standard fields also store values for the ''starttime'' and ''endtime'' respectively. Thus you must include the times as well as the dates (if the times are enabled). The format should be:
+
The ''startdate'' and ''enddate'' [[Standard Fields]] also store time values for the ''starttime'' and ''endtime'' respectively. Thus you must include the times as well as the dates (if the times are enabled). Similarly with ''lastmodified'' (although there is no associated ''lastmodifiedtime'' variable).
yyyy-mm-dd HH:mm:ss
+
 
 +
The format should be:
 +
'''yyyy-mm-dd HH:mm:ss'''
  
 
Where HH is the hour using the 24hr format.
 
Where HH is the hour using the 24hr format.
  
ie: ''2012-01-31 17:30:00''
+
Example:
 +
''2012-01-31 17:30:00''
 +
 
  
'''Note''': if you omit the time when updating the ''startdate'' or ''enddate'' standard fields, any times that had been stored in the ''starttime'' or ''endtime'' will be reset to 00:00:00
 
  
 
==Custom Fields==
 
==Custom Fields==
  
Accordingly when updating date fields (both standard fields and custom fields) using Pandora the format of the value sent must be '''yyyy-mm-dd'''
+
When updating Date [[Custom Fields]] using Pandora the format of the value sent must be '''yyyy-mm-dd'''.
 
+
* Times cannot be saved with Date Custom Fields.
  
 +
==Notes==
 +
* If you omit the time when updating the ''startdate'' or ''enddate'' standard fields, the stored in the ''starttime'' or ''endtime'' will be set to 00:00:00, overwriting any times that may have been stored previously.
 +
* The Level 1 ''closedate'' standard field does '''not''' store a time so should be updated using '''yyyy-mm-dd''' only.
 +
* The ''lastmodified'' standard field on transactions is ''trsts''
  
  

Revision as of 17:44, 5 August 2010

Dates are stored in the SmartSimple database in the following format: yyyy-mm-dd

Accordingly when updating date fields with Pandora the submitted data must be formatted identically.


Standard Fields

The startdate and enddate Standard Fields also store time values for the starttime and endtime respectively. Thus you must include the times as well as the dates (if the times are enabled). Similarly with lastmodified (although there is no associated lastmodifiedtime variable).

The format should be: yyyy-mm-dd HH:mm:ss

Where HH is the hour using the 24hr format.

Example:

2012-01-31 17:30:00


Custom Fields

When updating Date Custom Fields using Pandora the format of the value sent must be yyyy-mm-dd.

  • Times cannot be saved with Date Custom Fields.

Notes

  • If you omit the time when updating the startdate or enddate standard fields, the stored in the starttime or endtime will be set to 00:00:00, overwriting any times that may have been stored previously.
  • The Level 1 closedate standard field does not store a time so should be updated using yyyy-mm-dd only.
  • The lastmodified standard field on transactions is trsts


See Also