Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Programming Microsoft Dynamics 365 Business Central - Sixth Edition

You're reading from  Programming Microsoft Dynamics 365 Business Central - Sixth Edition

Product type Book
Published in Apr 2019
Publisher Packt
ISBN-13 9781789137798
Pages 536 pages
Edition 6th Edition
Languages
Authors (3):
Marije Brummel Marije Brummel
Profile icon Marije Brummel
David Studebaker David Studebaker
Profile icon David Studebaker
Christopher D. Studebaker Christopher D. Studebaker
Profile icon Christopher D. Studebaker
View More author details

Table of Contents (12) Chapters

Preface Introduction to Business Central Tables Data Types and Fields Pages - The Interactive Interface Queries and Reports Introduction to AL Intermediate AL Advanced AL Development Tools Successful Conclusions Assessments Other Books You May Enjoy

CALCDATE

CALCDATE allows us to calculate a date value that's been assigned to a date data type variable. The calculation is based on DateExpression that's been applied to a base date (reference date). If we don't specify BaseDateValue, the current system date is used as the default date. We can specify BaseDateValue either in the form of a variable of data type date or as a date constant.

The syntax for CALCDATE is as follows:

DateVariable := CALCDATE ( DateExpression [, BaseDateValue]) 

There are a number of ways in which we can build a DateExpression. The rules for the CALCDATE function, DateExpression, are similar to the rules for DateFormula, which are described in Chapter 3, Data Types and Fields.

If there is a CW, CM, CP, CQ, or CY (current week, current month, current period, current quarter, or current year, respectively) parameter in an expression, then the result will be evaluated based on the BaseDateValue. If we have more than one of these in our expression...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}