This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19
VP SET DATE VALUE

VP SET DATE VALUE 


 

VP SET DATE VALUE ( rangeObj ; dateValue {; formatPattern} ) 
Parameter Type   Description
rangeObj  Object in Range object
dateValue  Date in Date value to set
formatPattern  Text in Format of value

The VP SET DATE VALUE command assigns a specified date value to a designated cell range.

In rangeObj, pass a range of the cell(s) whose value you want to specify. If rangeObj includes multiple cells, the value specified will be repeated in each cell.

The dateValue parameter specifies a date value to be assigned to the rangeObj.

The optional formatPattern defines a pattern for the dateValue parameter. Pass any custom format or you can use one of the following constants:

Constant Value Comment
vk pattern long date "_longDatePattern_" ISO 8601 format for the full date in current localization.
USA default pattern: "dddd, dd MMMM yyyy"
vk pattern month day "_monthDayPattern_" ISO 8601 format for the month and day in current localization.
USA default pattern: "MMMM dd"
vk pattern short date "_shortDatePattern_" Abbreviated ISO 8601 format for the date in current localization.
USA default pattern: "MM/dd/yyyy"
vk pattern year month "_yearMonthPattern_" ISO 8601 format for the month and year in current localization.
USA default pattern: "yyyy MMMM"

For information on patterns and formatting characters, please refer to the 4D View Pro Cell Format section.

Example  

  //Set the cell value to the current date
 VP SET DATE VALUE(VP Cell("ViewProArea";4;2);Current date))
 
  //Set the cell value to a specific date with a designated format
 VP SET DATE VALUE(VP Cell("ViewProArea";4;4);Date("12/25/94");"d/m/yy ")
 VP SET DATE VALUE(VP Cell("ViewProArea";4;6);!2005-01-15!;vk pattern month day)



See also 

4D View Pro Cell Format
VP SET DATE TIME VALUE
VP SET VALUE

 
PROPERTIES 

Product: 4D
Theme: 4D View Pro Language
Number: 9576

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v17 R4

 
ARTICLE USAGE

4D View Pro Reference ( 4D v19)