Edit

DateToPeriod (date)

Result Type: Number

Definition: Converts the supplied date to the period (i.e. the internal representation of a period in MoneyWorks). This period number can then be used to search the Transaction.Period field.

Examples:  DateToPeriod('21/2/97')

returns 202 if the financial year started in January and 1997 is the second year of operation.

See Also:

CalcDueDate: Calculate a due date for given terms

CurrentPeriod: Get the current period number

Date: Convert d,m,y to a date

DateToText: Format a date as a string

Day: Get the Day of month of a date

DayOfWeek: Get The weekday of a date

FirstUnlockedPeriod: Get the oldest period that is not locked

Month: Get the month of a date

PeriodName: Get the Name of a period

PeriodOffset: Difference between two periods

PeriodToDate: Get the end date of a period

TextToDate: Parse a string to a date

Time: The current Datetime

TimeAdd: Add seconds to a DateTime

TimeDiff: The difference, in seconds, between two DateTimes

Timestamp: A timestamp string

Today: Today's date

WeekOfYear: Convert a date to a week number

Year: Year of a date