(1) Date():- Date function returns the current date in mm/dd/yy format. This function is use to print
date on report. Foxpro display the date as set above in computer.Syntax : Date()
Example : ? Date()
Output : 01/21/08
Function returns : Date
(2) Year():- Year function returns the numeric year from the date expression.This function is
always display the year with century. Foxpro display the as set above in computer.
Syntax:- Year(<exprDate>)
Example:- ? Year(date())
Output:- 2008
Function returns: Numeric
(3)Month():- Month function returns the numeric month from the date expression. Foxpro display
the month as set above in computer.
Syntax:- Month(<exprDate>)
Example:- ? Month(date())
Output:- 1
Function returns: Numeric
(4)Cmonth():- Cmonth function returns the name of month in character from the date expression.
Foxpro display the monthname as set above in computer.
Syntax:- Cmonth(<exprDate>)
Example:- ? Cmonth(date())
Function returns: Character
Output:- January
(5)Day():- Day function returns the numeric day value from the date expression. Foxpro display
the day as set above in computer.
Syntax:- Day(<exprDate>)
Example:- ? Day(date())
Output:- 21
Function returns: Numeric
(6)CDOW():- CDOW means character day of week.This function returns the character day from the
date expression. Foxpro display the day as set above in computer.
Syntax:- CDOW(<exprDate>)
Example:- ? CDOW(date())
Output:- Monday
Function returns: Character
(7)DOW():- DOW means Day of Week. This function returns the Numeric day value from the date
expression. Foxpro display the day as set above in computer.(0 for Sunday and 6 for
Saturday)
Syntax:- DOW(<exprDate>)
Example:- ? DOW(date())
Output:- 1
Function returns: Numeric
(8) Gomonth():- Gomonth function Returns the date that is a specified number of months before or
after a given date.Foxpro display the day as set above in computer.
Syntax:- Gomonth(<exprDate>,<expN>)
Example:- ? Gomonth(date(),3)
Output:- 04/21/08
Function returns: Date
(9)DtoC():- DtoC means Date to character. This function is use to change date to char format.
Syntax:- DtoC(<exprDate>)
Example:- d1=date()
Disp memo like d1 (oputput:-d1 date ‘01/21/08’)
D1=DtoC(d1)
Disp memo like d1 (oputput:-d1 Character ‘01/21/08’)
Function returns:- Character
(10) CtoD():- CtoD means Character to Date. This function is use to change character type date in date format.
Syntax:- CtoD(<expC>)
Example:- d1=’05/11/07’
Disp memo like d1 (oputput:-d1 Charater ‘05/11/07’)
D1=CtoD(d1)
Disp memo like d1 (oputput:-d1 Date ‘05/11/07’)
Function returns:- Date
(11) Time():- Time function always return the current time as set in computer. This function Returns the current system time in 24-hour, eight-character string (HH:MM:SS) format. This function is use to print the time of printout in reports.
Syntax:- Time()
Example:- ?Time()
Output:- 08:52:25
Function returns:- Character
(12) Second():- Second function always return the seconds that were passed between 12pm to current time as set in computer.This function returns the value in floating point.
Syntax:- Second()
Example:- ?Second()
Output:- 32128.830
Function returns:- Numeric
(13)Sys(2):- Sys function always return the seconds that were passed between 12pm to current time as set in computer.This function returns the value in Integer format.
Syntax:- Second()
Example:- ?Second()
Output:- 32128
Function returns:- Numeric