|
|
#11 |
|
Registrierter Benutzer
|
E r g e b n i s / R e s u l t
Rechnet die Differenz zwischen zwei Daten aus und gibt sie in Monaten Calculate the difference in months between two dates B e s c h r e i b u n g / D e s c r i p t i o n Calculating the difference between two dates is not a function built in to Open Access. This function returns the number of whole months between two dates, in the range 0 - 11. The dates passed to the function can be anyway around as the routine calculates the difference rather than subtracting one from the other. S y n t a x Code:
value = call ('DATEDIF1' , datefld1 , datefld2)datefld1, datefld2 - any Open Access date value - an integer number of months R e t u r n s An integer value. B e i s p i e l / E x a m p l e Code:
attach 'DATEDIF'
put call ('DATEDIF1' , sysdate , sysdate - 360) ! prints 11
detach 'DATEDIF'DATEDIF2 |
|
|
|
|
|
#12 |
|
Registrierter Benutzer
|
E r g e b n i s / R e s u l t
Rechnet die Differenz zwischen zwei Daten aus und gibt sie in Jahren Calculate the difference in years between two dates B e s c h r e i b u n g / D e s c r i p t i o n Performing a similar function to DATEDIF1, this function calculates the number of whole years between two dates and returns this as an integer. S y n t a x Code:
value = call ('DATEDIF2' , datefld1 , datefld2)datefld1, datefld2 - any Open Access date value - an integer number of years R e t u r n s An integer number of years B e i s p i e l / E x a m p l e Code:
attach 'DATEDIF'
put call ('DATEDIF2' , sysdate , sysdate - 360) ! prints 0
put call ('DATEDIF2' , sysdate , sysdate - 400) ! prints 1
detach 'DATEDIF'DATEDIF1 |
|
|
|
|
|
#13 |
|
Registrierter Benutzer
|
E r g e b n i s / R e s u l t
Fügt eine exakte Anzahl von Monaten einem Datum hinzu Add an exact number of months to a date B e s c h r e i b u n g / D e s c r i p t i o n This function takes a date and adds a number of months passed to the function. As the function adds the value directly to the month and does not add 30 or 31 days then you can be assured that the day number will stay the same. S y n t a x Code:
date = call ('DATEDIF3' , datefld , months)datefld - any Open Access date months - an integer number of months R e t u r n s A date field. B e i s p i e l / E x a m p l e Code:
attach 'DATEDIF'
put call ('DATEDIF3' , sysdate , 1) ! prints next month's date
put call ('DATEDIF3' , sysdate , -1) ! prints last month's date
detach 'DATEDIF'DATEDIF4 |
|
|
|
|
|
#14 |
|
Registrierter Benutzer
|
E r g e b n i s / R e s u l t
Fügt eine exakte Anzahl von Jahren einem Datum hinzu Add an exact number of years to a date B e s c h r e i b u n g / D e s c r i p t i o n This function takes a date and adds a number of years passed to the function. As the function adds the value directly to the year and does not add 365 days (or 365.25) then you can be assured that the day number and month will stay the same. S y n t a x Code:
date = call ('DATEDIF4' , datefld , years)datefld - any Open Access date years - an integer number of years R e t u r n s A date field. B e i s p i e l / E x a m p l e Code:
attach 'DATEDIF'
put call ('DATEDIF4' , sysdate , 1) ! prints next year's date
put call ('DATEDIF4' , sysdate , -10) ! prints the date 10 years ago
detach 'DATEDIF'DATEDIF3 |
|
|
|
|
|
#15 |
|
Registrierter Benutzer
|
E r g e b n i s / R e s u l t
Liefert den vorhergehenden Vierteltag für ein Datum. Return the previous quarter day for a date B e s c h r e i b u n g / D e s c r i p t i o n The procedure accepts a date and returns the previous quarter day. The quarter days (used in leasehold / service accounts) are - 25th March 26th June 29th September 25th December So, given a date of 28/04/1996 a date of 25/03/1996 will be returned. S y n t a x Code:
qtrday = call ('QTR1' , datefld)datefld - Any valid Open Access date. R e t u r n s A quarter day as a date. B e i s p i e l / E x a m p l e Code:
attach 'DATEDIF'
put call ('QTR1' , sysdate) ! prints the last quarter day
detach 'DATEDIF'QTR2 |
|
|
|
|
|
#16 |
|
Registrierter Benutzer
|
E r g e b n i s / R e s u l t
Liefert den kommenden Vierteltag für ein Datum Return the next quarter day for a date B e s c h r e i b u n g / D e s c r i p t i o n The procedure accepts a date and returns the next quarter day. The quarter days (used in leasehold / service accounts) are - 25th March 26th June 29th September 25th December So, given a date of 28/04/1996 a date of 26/06/1996 will be returned. S y n t a x Code:
qtrday = call ('QTR2' , datefld)datefld - Any valid Open Access date. R e t u r n s A quarter day as a date. B e i s p i e l / E x a m p l e Code:
attach 'DATEDIF'
put call ('QTR2' , sysdate) ! prints the next quarter day
detach 'DATEDIF'QTR1 |
|
|
|
|
|
#17 |
|
Registrierter Benutzer
|
E r g e b n i s / R e s u l t
Liefert die Anzahl der Tage von einem vorhergehenden Vierteltag Return the number of days from the previous quarter day B e s c h r e i b u n g / D e s c r i p t i o n The procedure accepts a date and returns the number of days since the previous quarter day. The quarter days (used in leasehold / service accounts) are - 25th March 26th June 29th September 25th December So, given a date of 28/03/1996 an integer value of 3 will be returned. S y n t a x Code:
value = call ('QTR2' , datefld)datefld - Any valid Open Access date. R e t u r n s An integer number of days. B e i s p i e l / E x a m p l e Code:
attach 'DATEDIF'
put call ('QTR3' , sysdate) ! prints the number of days since
! the last quarter day
detach 'DATEDIF'QTR4 |
|
|
|
|
|
#18 |
|
Registrierter Benutzer
|
QTR4
E r g e b n i s / R e s u l t
Liefert die Anzahl der Tage für den nächsten Vierteltag Return the number of days to the next quarter day B e s c h r e i b u n g / D e s c r i p t i o n The procedure accepts a date and returns the number of days until the next quarter day. The quarter days (used in leasehold / service accounts) are - 25th March 26th June 29th September 25th December So, given a date of 20/12/1996 an integer value of 5 will be returned. S y n t a x Code:
value = call ('QTR4' , datefld)datefld - Any valid Open Access date. R e t u r n s An integer number of days. B e i s p i e l / E x a m p l e Code:
attach 'DATEDIF'
put call ('QTR4' , sysdate) ! prints the number of days until
! the next quarter day
detach 'DATEDIF'QTR3 |
|
|
|
|
|
#19 |
|
Registrierter Benutzer
|
E r g e b n i s / R e s u l t
Liefert das erste Wort oder Vornamen in einem String. Returns the first word or forename in a string B e s c h r e i b u n g / D e s c r i p t i o n This function returns a string composed of the first word (effectively the forename) of a string passed to it. S y n t a x Code:
answer = call ('FORENAME' , A)A - is any string or constant R e t u r n s Returns a string variable, the length set to the first word. B e i s p i e l / E x a m p l e Code:
attach 'string'
put call ('FORENAME' , 'Test String' ) ! prints Test
a = 'Theo P Wildebeest'
b = call ('FORENAME' , a) ! b contains 'Theo'
detach 'string'INITIALS SURNAME LEFT |
|
|
|
|
|
#20 |
|
Registrierter Benutzer
|
E r g e b n i s / R e s u l t
Liefert die Initialen in einem String. Returns the initials in a string B e s c h r e i b u n g / D e s c r i p t i o n This function returns a string composed of the initials of a string passed to it. It ignores the first and last word of any string passed to it and returns what's left. This may be nothing, then a zero length string is returned. S y n t a x Code:
initials = call ('INITIALS' , string)string - is any string or constant R e t u r n s Returns a string variable, the length of the initials. B e i s p i e l / E x a m p l e Code:
attach 'string'
put call ('INITIALS' , 'Test String' ) ! prints nothing
a = 'Theo P Wildebeest'
b = call ('INITIALS' , a) ! b contains 'P'
detach 'string'FORENAME SURNAME MID |
|
|
|