AFC - Abacus Formula Compiler for Java

Date Functions In AFC

Date Functions

The supported date functions are shown by example below:

NOW
AB
2(now)=NOW()

TODAY
AB
4(today)=TODAY()

DATE
ABCDE
639447.0=DATE( C6, D6, E6 )2007.012.031.0
722383.0...1961.04.012.0
82713.0...7.06.05.0
938356.0...2003.023.065.0
1039040.0...2008.0-10.0-73.0
11689706.0...1888.05.06.0

TIME
ABCDE
132:03:04.000=TIME( C13, D13, E13 )2.03.04.0
1416:55:59.000...16.055.059.0
1516:19:16.000...39.078.076.0
1623:33:20.000...100.0-200.0-4000.0

SECOND
ABC
1845.0=SECOND( C18 )12:30:45.000
190.0...35222.5
2059.0...3653.999988425926
2159.0...3653.999994
220.0...3653.999995

MINUTE
ABC
2430.0=MINUTE( C24 )12:30:45.000
250.0...35222.5
2659.0...3653.999988425926
2759.0...3653.999994
280.0...3653.999995

HOUR
ABC
3012.0=HOUR( C30 )12:30:45.000
3112.0...35222.5
3223.0...3653.999988425926
3323.0...3653.999994
340.0...3653.999995

WEEKDAY
ABCD
367.0=WEEKDAY( C36 )39452.0
371.0...39453.0
387.0=WEEKDAY( C38, D38 )39452.01.0
391.0...39453.01.0
407.0...39453.02.0
411.0...39454.02.0
426.0...39453.03.0
430.0...39454.03.0
44!FE...39454.00.0Excel says: #NUM!
45!FE...39454.04.0Excel says: #NUM!

DAY
ABC
471.0=DAY( C47 )40179.0
486.0...35222.5
4931.0...3653.0
504.0...4.0

MONTH
ABC
521.0=MONTH( C52 )40179.0
536.0...35222.5
5412.0...3653.0

YEAR
ABC
562010.0=YEAR( C56 )40179.0
571996.0...35222.5
581909.0...3653.0

DAYS360
ABCDE
601095.0=DAYS360( C60, D60 )35222.036332.0
613600.0=DAYS360( C61, D61 )7305.99936342592610958.561805555555
62-331.0...39788.039452.0
63331.0...39452.039788.0
64180.0...34758.034942.0
65180.0...35124.035308.0
6660.0...35094.035155.0
6760.0...35095.035155.0
69182.0=DAYS360( C69, D69, E69 )34758.034942.0true
70180.0...34758.034942.0false
71181.0...35124.035308.0true