| |
|
|
Jörg Sellmeyer | The Datumsfunktionen in XProfan are (find I) not integrally slight To durchschauen. Also is the Syntax something ...hrm... umständlich. with a couple own Procedures can from it but speedy and übersichtliche Terminfunktionen produce:
Proc yesterday
Return Dt("getDate",0,dt("incDay",!now,-1))
ENDPROC
Proc tommorrow
Return Dt("getDate",0,dt("incDay",!now,1))
ENDPROC
'the first both Procedures only from Found the comfort drin.
'one can also The Proc today with suitable Parameters +1/-1 Call.
'meaningfully would z. B., these both Procedures in a Headerdatei To write:
'MORGEN = Dt("getDate",0,dt("incDay",!now,1));
'GESTERN = Dt("getDate",0,dt("incDay",!now,-1));
'appeal then with: Print ~MORGEN
'one could here naturally yet a optionalen Parameter for the Ausgabeformat install.
'the Have I but from Found the better Übersichtlichkeit let.
Proc today
If %pcount = 1
Parameters i%
ElseIf %pcount = 2
Parameters date$,i%
Else
Var i% = 0
EndIf
Return Dt("getDate",0,dt("incDay",!now,i%))
ENDPROC
Proc DatumPlus
Parameters d%,m%,j%,d$
Declare Date!
If %pcount = 3
'if no date indicated becomes, becomes the "Heute" uses
date! = !now
ElseIf %pcount = 4
date! = Dt("setDate",d$)
EndIf
Date! = dt("incDay",date!,d%)
Date! = dt("incMonth",date!,m%)
Date! = dt("incYear",date!,j%)
Return Dt("getDate",0,Date!)
ENDPROC
Proc DatumIntervall
Parameters D$,I%,amount%
Var date! = Dt("setDate",D$)
WhileLoop 1,amount% * I%,I%
Print Dt("getDate",0,dt("incDay",date!,&Loop)),&loop
'here would a spending z. B. into Listboxliste naturally sinnvoller
'AddStrings Dt("getDate",0,dt("incDay",date!,d%))
Wend
ENDPROC
Print "Gestern was " + yesterday()
Print "Heute is " + today()
Print "Morgen is " + tommorrow()
Print
Print "Vor 5 Meet was the " + today(-5)
Print "In 50 Meet is the " + today(50)
Print
Print "In 10 Meet, 6 Monaten and 12 years is the " + DatumPlus(10,6,12)
Print "Vor 10 Meet, 6 Monaten and 12 years was the " + DatumPlus(-10,-6,-12)
Print "und the goes too with a beliebigen date: " + DatumPlus(1,-6,2,"02.05.1999")
Print
Print "Taste drücken"
WaitKey
Print
Print "Eine list with 14-daily Terminen ex the 15.5.2013"
DatumIntervall("15.5.2013",14,10)
WaitInput
WaitInput
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 03/07/13 ▲ |
|
|
|
|
| On each drop meaningfully.
How is with the date->Zeitstempel? |
|
|
| |
|
|
|
Jörg Sellmeyer | What exactly Dou you mean with Zeitstempel? the here:
gives you z. B. a english spending with Offset to UTC from. If you one bestimmtes Ausgabeformat having want, gib time an example what about me bastel what together. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 03/07/13 ▲ |
|
|
|
|
| I mean whom undertow. Unix Timestamp: [...]
means amount past sec since 01.01.1970 00:00.00 UTC.
In nProcs can simply:
write: [...] |
|
|
| |
|
|
|
Jörg Sellmeyer | Should Yes in the principle something like How that here his:
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 03/07/13 ▲ |
|
|
|