Antwort schreiben...
 
Themen-Optionen Thema durchsuchen
Alt 31.05.2007, 12:11   #11
RKabis
Registrierter Benutzer
Beschreibung vorhanden OSA DATEDIF1 bis DATEDIF4

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)
P a r a m e t e r

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'
Q u e r v e r w e i s / R e f e r e n c e

DATEDIF2
Angehängte Dateien
Dateityp: oac DATEDIF.OAC‎ (20.5 KB, 3x aufgerufen)
RKabis ist offline   Mit Zitat antworten
Alt 31.05.2007, 12:20   #12
RKabis
Registrierter Benutzer
Beschreibung vorhanden DATEDIF2

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)
P a r a m e t e r

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'
Q u e r v e r w e i s / R e f e r e n c e

DATEDIF1
RKabis ist offline   Mit Zitat antworten
Alt 31.05.2007, 12:23   #13
RKabis
Registrierter Benutzer
Beschreibung vorhanden DATEDIF3

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)
P a r a m e t e r

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'
Q u e r v e r w e i s / R e f e r e n c e

DATEDIF4
RKabis ist offline   Mit Zitat antworten
Alt 31.05.2007, 12:25   #14
RKabis
Registrierter Benutzer
Beschreibung vorhanden DATEDIF4

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)
P a r a m e t e r

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'
Q u e r v e r w e i s / R e f e r e n c e

DATEDIF3
RKabis ist offline   Mit Zitat antworten
Alt 31.05.2007, 16:36   #15
RKabis
Registrierter Benutzer
Beschreibung vorhanden OSA QTR1 bis QTR4

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)
P a r a m e t e r

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'
Q u e r v e r w e i s / R e f e r e n c e

QTR2
Angehängte Dateien
Dateityp: oac DATEDIF.OAC‎ (20.5 KB, 3x aufgerufen)
RKabis ist offline   Mit Zitat antworten
Alt 31.05.2007, 16:38   #16
RKabis
Registrierter Benutzer
Beschreibung vorhanden QTR2

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)
P a r a m e t e r

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'
Q u e r v e r w e i s / R e f e r e n c e

QTR1
RKabis ist offline   Mit Zitat antworten
Alt 31.05.2007, 16:40   #17
RKabis
Registrierter Benutzer
Beschreibung vorhanden QTR3

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)
P a r a m e t e r

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'
Q u e r v e r w e i s / R e f e r e n c e
QTR4
RKabis ist offline   Mit Zitat antworten
Alt 31.05.2007, 16:41   #18
RKabis
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)
P a r a m e t e r

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'
Q u e r v e r w e i s / R e f e r e n c e
QTR3
RKabis ist offline   Mit Zitat antworten
Alt 31.05.2007, 17:14   #19
RKabis
Registrierter Benutzer
Beschreibung vorhanden OSA FORENAME

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)
P a r a m e t e r

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'
Q u e r v e r w e i s / R e f e r e n c e

INITIALS
SURNAME
LEFT
Angehängte Dateien
Dateityp: oac STRING.OAC‎ (15.5 KB, 3x aufgerufen)
Dateityp: zip string.zip‎ (9.9 KB, 3x aufgerufen)
RKabis ist offline   Mit Zitat antworten
Alt 31.05.2007, 17:17   #20
RKabis
Registrierter Benutzer
Beschreibung vorhanden OSA INITIALS

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)
P a r a m e t e r

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'
Q u e r v e r w e i s / R e f e r e n c e

FORENAME
SURNAME
MID
Angehängte Dateien
Dateityp: oac STRING.OAC‎ (15.5 KB, 3x aufgerufen)
RKabis ist offline   Mit Zitat antworten


Antwort schreiben...

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche