Difference between revisions of "Date Expressions"

From Keyfax Wiki
Jump to: navigation, search
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
{| class="wikitable"
 
{| class="wikitable"
|+ As Date Expressions
+
|+ style="text-align:left;" | AsDate Expressions
 
!Expression
 
!Expression
 
!Databox Value
 
!Databox Value
Line 77: Line 77:
 
|2018
 
|2018
 
|A date entry is converted into the year
 
|A date entry is converted into the year
 +
|}
 +
 +
{| class="wikitable"
 +
|+ style="text-align:left;" | Other Date Expressions
 +
!Expression
 +
!Databox Value
 +
!Result
 +
!Comments
 +
|-
 +
|After("14-10-2010")
 +
|"15-10-2010 08:00pm"
 +
|True
 +
|Any time part of the date is ignored
 +
|-
 +
|Before("14-10-2010")
 +
|"15-10-2010 08:00pm"
 +
|False
 +
|Any time part of the date is ignored
 +
|-
 +
|BetweenDates ("15-10-2010",Today)
 +
|"15-10-2010 08:00pm"
 +
|True
 +
|Will compare inclusive of the dates used (ignoring time). Can be arranged in any order e.g. BetweenDates(Today, "15-10-2010") or - replace Today with a date e.g. BetweenDates(“15-10-2010”,”23-10-2010”)
 +
|-
 +
|AsDate Format(‘HHmm’) AsNum Between(0800,1530)
 +
|"15-10-2010 08:00pm"
 +
|False
 +
|Will compare two times and check if the current time is within them
 +
|-
 +
|DateAdd(12,"m")
 +
|"15-10-2010 08:00pm"
 +
|15/10/2011 20:00:00
 +
|Intervals: s - seconds, n - minutes, h - hours, d - days, m - months, q - quarters, ww - weeks, yyyy - years
 +
|}
 +
 +
{| class="wikitable"
 +
|+ style="text-align:left;" | Returning Numerics Now/Today
 +
!Expression
 +
!Databox Value
 +
!Result
 +
!Comments
 +
|-
 +
|Day
 +
|"15-10-2010 08:00pm"
 +
|15
 +
|Will show the day as a Numeric result only
 +
|-
 +
|Month
 +
|"15-10-2010 08:00pm"
 +
|10
 +
|Will show the month as a Numeric result only
 +
|-
 +
|WeekDay
 +
|"15-10-2010 08:00pm"
 +
|6
 +
|Will show the weekday as a Numeric result only. Sunday will count as day 1 – Saturday, day 7
 +
|-
 +
|Year
 +
|"15-10-2010 08:00pm"
 +
|2010
 +
|Will show the year as Numeric result only
 +
|-
 +
|Now
 +
|Current date and time is:
 +
|Current date and time is: 15 Oct 2010 - 20:00
 +
|&Format(Now, "dd MMM yyyy - HH:mm") Returns the present Date and Time
 +
|-
 +
|Today
 +
|Current month and year: 
 +
|Current month and year: Oct 2010
 +
|&Format(Today, "MMM yyyy") Returns the present Date and Time
 
|}
 
|}

Latest revision as of 12:22, 28 February 2018


AsDate Expressions
Expression Databox Value Result Comments
AsDate "15-10-2018 08:00pm" 15/10/2018 20:00:00 A date entry is converted into a simple date format
AsDate Format ("ddd dd MMM yyyy - HH:mm") "15-10-2018 08:00pm" Mon 15 Oct 2018 - 20:00 A date entry is formatted to the required layout
AsDate Format (‘d’) "15-10-2018 08:00pm" 15/10/2018 A date entry is converted into day/month/year
AsDate Format (‘dd’) "15-10-2018 08:00pm" 15 A date entry is converted into day of the month
AsDate Format (‘ddd’) "15-10-2018 08:00pm" Mon A date entry is converted into short name for day
AsDate Format (‘dddd’) "15-10-2018 08:00pm" Monday A date entry is converted into full name for day
AsDate Format (‘D’) "15-10-2018 08:00pm" 15 Oct 2018 A date entry is converted into day month year (with short month name)
AsDate Format (‘m') "15-10-2018 08:00pm" 15 Oct A date entry is converted into day month (with short month name)
AsDate Format (‘mm') "15-10-2018 08:00pm" 00 (minutes) A date entry is converted into the minutes past the hour
AsDate Format (‘MM’) "15-10-2018 08:00pm" 10 A date entry is converted into the month
AsDate Format (‘MMM’) "15-10-2018 08:00pm" Oct A date entry is converted into the month (with short month name)
AsDate Format (‘y’) "15-10-2018 08:00pm" Oct 2018 A date entry is converted into month year (with short month name)
AsDate Format (‘yy’) "15-10-2018 08:00pm" 18 A date entry is converted into final two numbers of the year
AsDate Format (‘yyy’) "15-10-2018 08:00pm" 2018 A date entry is converted into the year
Other Date Expressions
Expression Databox Value Result Comments
After("14-10-2010") "15-10-2010 08:00pm" True Any time part of the date is ignored
Before("14-10-2010") "15-10-2010 08:00pm" False Any time part of the date is ignored
BetweenDates ("15-10-2010",Today) "15-10-2010 08:00pm" True Will compare inclusive of the dates used (ignoring time). Can be arranged in any order e.g. BetweenDates(Today, "15-10-2010") or - replace Today with a date e.g. BetweenDates(“15-10-2010”,”23-10-2010”)
AsDate Format(‘HHmm’) AsNum Between(0800,1530) "15-10-2010 08:00pm" False Will compare two times and check if the current time is within them
DateAdd(12,"m") "15-10-2010 08:00pm" 15/10/2011 20:00:00 Intervals: s - seconds, n - minutes, h - hours, d - days, m - months, q - quarters, ww - weeks, yyyy - years
Returning Numerics Now/Today
Expression Databox Value Result Comments
Day "15-10-2010 08:00pm" 15 Will show the day as a Numeric result only
Month "15-10-2010 08:00pm" 10 Will show the month as a Numeric result only
WeekDay "15-10-2010 08:00pm" 6 Will show the weekday as a Numeric result only. Sunday will count as day 1 – Saturday, day 7
Year "15-10-2010 08:00pm" 2010 Will show the year as Numeric result only
Now Current date and time is: Current date and time is: 15 Oct 2010 - 20:00 &Format(Now, "dd MMM yyyy - HH:mm") Returns the present Date and Time
Today Current month and year: Current month and year: Oct 2010 &Format(Today, "MMM yyyy") Returns the present Date and Time