Command PV SET CELL DATE TIME VALUE

4D View

PV SET CELL DATE TIME VALUE

version 6.8


PV SET CELL DATE TIME VALUE (area; column; row; date; time)

ParameterTypeDescription
areaLongint4D View area
columnLongintCell column number
rowLongintCell row number
dateDateDate cell value
timeTimeTime cell value

Description

The PV SET CELL DATE TIME VALUE command assigns the values date and time as a single value to the cell assigned by column and row.

Example

This method requests a date and time for a meeting, with the latter being pushed ahead to the next day, a half-hour later. It then displays the new appointment in cell A1:

   C_DATE($Date)  `Meeting date
   C_TIME($Time)  `Meeting time
   
   $Date:=Date(Request("Date of meeting";String(Current date)))
   If ($Date#!00/00/00!)  `Date valid
      $Time:=Time(Request("Time of meeting";Time string(Current time)))
      If ($Time#†00:00:00†)  `Time valid
             `Reschedule the meeting a day later and 1/2 hour later then assign to cell A1
         PV SET CELL DATE TIME VALUE (Area;1;1;$Date+1;$Time+†00:30:00†)
         PV GET CELL DATE TIME VALUE (Area;1;1;$Date;$Time)  `Read info
         ALERT ("The meeting has been pushed ahead to  "+String($Date)+" at "+Time string($Time))
      End if 
   End if 

See Also

PV GET CELL DATE TIME VALUE, PV Get cell value type.