Forum | | | | - Page 1 - |
| holmol93 | Hello together
I come not any more from the ask out, How one sees....oO though have so did i for these ask a little bit rumgeschaut and no suitable response found...
The first thing: It's all right therefore, whether it possible is, anhand zweier Zeitstempel in the form The dt("getdate",6) outputs, The Stundendifferenz To calculate.
Konkret for, around the Arbeitsstunden anhand of One- and Ausloggstempeln To calculate.
so one itself the rather present can, is in the attachment one Screenshot the Stempelzeiten one User of a workday.
the second, is sooner one small trouble. for want of windows entwickle I mean (windows-) XProfan software mithilfe of WINE on the mac. now have I once my software on one windows 7 PC tested. Optisch gefällt tappt im dunkeln me there explicit rather *g* but my trouble is, that Choiceboxen not aufklappen. on the tested windows 7 machine can The Choiceboxen You can and the contents with the Pfeiltasten durchscrollen, tappt im dunkeln poppen but not, so How tappt im dunkeln the really should. On my mac with WINE functions this but.
The Choiceboxen go integrally standardmässig prepares and befüllt (with Addstring), so How the too his ought to. in the internet have I nirgends a such drop found... has someone a idea?
Soo, time again langer Text become... The most complicated Einfälle have I hold unfortunately always then, if any others sleep ;)
greeting from Bern, danny |
| | | | |
| | | | | - Page 1 - |
| Thomas Freier | be I do not sure ob's not kürzer goes
CLS
Declare Time1$,Time2$,a$,b$,c$
Zeit1$="30.04.2013 19:15:10:00"
a$=substr$(Time1$,1," ")
b$=substr$(Time1$,-1," ")
Var a! = dt("setDateTime",val(substr$(a$,-1,".")), \
val( substr$(a$,2,".")), \
val( substr$(a$,1,".")), \
val( substr$(b$,1,":")), \
val( substr$(b$,2,":")), \
val( substr$(b$,3,":")), \
val( substr$(b$,-1,":")))
print dt("DateTimeStr", "dd.mm.yyyy'|'hh:nn:ss", a!)
Zeit2$="02.05.2013 19:00:00:00"
a$=substr$(Time2$,1," ")
b$=substr$(Time2$,-1," ")
Var b! = dt("setDateTime",val(substr$(a$,-1,".")), \
val( substr$(a$,2,".")), \
val( substr$(a$,1,".")), \
val( substr$(b$,1,":")), \
val( substr$(b$,2,":")), \
val( substr$(b$,3,":")), \
val( substr$(b$,-1,":")))
print dt("DateTimeStr", "dd.mm.yyyy'|'hh:nn:ss", b!)
print
Var c!=a!-b!
a$= dt("DateTimeStr", "dd.mm.yyyy'|'hh:nn:ss", c!)
print a$
' zero-date = 30.12.1899 0:0:0
b$=substr$(a$,1,"|")
c$=substr$(a$,-1,"|")
print b$
print c$
print
Set("Decimals",0)
print "By Time To Zeit"
print st$(abs(30-val(substr$(b$,1,"."))))+" day(e)"
print st$(abs(12-val(substr$(b$,2,"."))))+" month(e)"
print st$(abs(1899-val(substr$(b$,-1,"."))))+" year(e)"
print substr$(c$,1,":")+" Stunden"
print substr$(c$,2,":")+" Minuten"
print substr$(c$,-1,":")+" Sekunden"
waitinput
end
|
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 07/12/13 ▲ |
| |
| | Julian Schmidt | goes well into direction. [...]
Thomas his example accounts but yet days, Montate and years |
| | | | |
| | holmol93 | Hello together,
Thank you, has perfect worked
for the couple hours, The it To to charge counts, had I not even The routines to that to charge the days to assimilate
now is simply yet the second trouble there: The Choiceboxen, The under windows 7 not aufklappen.
have for time an example as Screenshot eingefügt.
Gruess,
danny |
| | | | |
| | Jörg Sellmeyer | Mach best one new Topic for on and gib one minimales, lauffähiges Codebeispiel thereby on. |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 07/12/13 ▲ |
| |
| | holmol93 | Heyho
Okay, then mach I the time ;)
thanks for Info
Gruess us Bärn,
danny |
| | | | |
| | Julian Schmidt | Thomas suitor (12.07.13)
be I do not sure ob's not kürzer goes
with functions In any drop.
Def @Date(1) dt("setDateTime",val(substr$(substr$(@$(1),1," "),-1,".")), val(substr$(substr$(@$(1),1," "),2,".")), val(substr$(substr$(@$(1),1," "),1,".")), val(substr$(substr$(@$(1),-1," "),1,":")), val(substr$(substr$(@$(1),-1," "),2,":")), val(substr$(substr$(@$(1),-1," "),3,":")), val(substr$(substr$(@$(1),-1," "),-1,":")))
Def @DateDiff(2) dt("DateTimeStr", "dd.mm.yyyy'|'hh:nn:ss:zzz", Date(@$(1))-Date(@$(2)))
Def @YearsBetween(2) val(abs(1899-val(substr$(substr$(DateDiff(@$(1),@$(2)),1,"|"),3,"."))))
Def @MonthsBetween(2) val(abs(12-val(substr$(substr$(DateDiff(@$(1),@$(2)),1,"|"),2,"."))))
Def @DaysBetween(2) val(abs(30-val(substr$(substr$(DateDiff(@$(1),@$(2)),1,"|"),1,"."))))
Def @HoursBetween(2) val(substr$(substr$(DateDiff(@$(1),@$(2)),-1,"|"),1,":"))
Def @MinutesBetween(2) val(substr$(substr$(DateDiff(@$(1),@$(2)),-1,"|"),2,":"))
Def @SecondsBetween(2) val(substr$(substr$(DateDiff(@$(1),@$(2)),-1,"|"),3,":"))
Def @MilliSecondsBetween(2) val(substr$(substr$(DateDiff(@$(1),@$(2)),-1,"|"),-1,":"))
CLS
Var Time1$="30.04.2013 19:15:10:01"
Var Time2$="02.05.2013 19:00:00:00"
print Time1$
print Time2$
print
print YearsBetween(Time1$, Time2$);" year(e)"
print MonthsBetween(Time1$, Time2$);" month(e)"
print DaysBetween(Time1$, Time2$);" day(e)"
print HoursBetween(Time1$, Time2$);" hour(n)"
print MinutesBetween(Time1$, Time2$);" Minute(n)"
print SecondsBetween(Time1$, Time2$);" second(n)"
print MilliSecondsBetween(Time1$, Time2$);" Millisekunde(n)"
waitinput
|
| | | | |
| | holmol93 | @Julian
so would it kürzer, but mere functional would it the same or? only that one The functions then everywhere inside the software Call can |
| | | | |
| | Julian Schmidt | Yes very. I Have Thomas its View source one To one into functions rewritten.
i think the View source liese itself with @dt("Get..." moreover telescope. Perhaps even so far the one the most Konstanten-functions save can. |
| | | | |
| | Julian Schmidt | Well so far I get it gekürzt. then is already Schluss.
Def @Date(1) dt("setDateTime",val(substr$(@$(1),3,".")), val(substr$(@$(1),2,".")), val(substr$(@$(1),1,".")), val(substr$(substr$(@$(1),-1," "),1,":")), val(substr$(@$(1),2,":")), val(substr$(@$(1),3,":")), 0)
Def @YearsBetween(2) 1899-dt("getYear", Date(@$(1))-Date(@$(2)))
Def @MonthsBetween(2) 12-dt("getMonth", Date(@$(1))-Date(@$(2)))
Def @DaysBetween(2) 30-dt("getDay", Date(@$(1))-Date(@$(2)))
Def @HoursBetween(2) dt("getHour", Date(@$(1))-Date(@$(2)))
Def @MinutesBetween(2) dt("getMin", Date(@$(1))-Date(@$(2)))
Def @SecondsBetween(2) dt("getSec", Date(@$(1))-Date(@$(2)))
CLS
Var Time1$="30.04.2013 19:15:10"
Var Time2$="02.05.2013 19:00:00"
print Time1$
print Time2$
print
print YearsBetween(Time1$, Time2$);" year(e)"
print MonthsBetween(Time1$, Time2$);" month(e)"
print DaysBetween(Time1$, Time2$);" day(e)"
print HoursBetween(Time1$, Time2$);" hour(n)"
print MinutesBetween(Time1$, Time2$);" Minute(n)"
print SecondsBetween(Time1$, Time2$);" second(n)"
waitinput
Def @Date(1) dt("setDateTime",val(substr$(@$(1),3,".")), val(substr$(@$(1),2,".")), val(substr$(@$(1),1,".")), val(substr$(substr$(@$(1),-1," "),1,":")), val(substr$(@$(1),2,":")), val(substr$(@$(1),3,":")), 0)
Def @DTBetween(3) If(@$(1)="Year",1899,If(@$(1)="Month",12,If(@$(1)="Day",30,0)))-dt("Get"+@$(1), Date(@$(2))-Date(@$(3)))*If(@$(1)="Hour",-1,If(@$(1)="Min",-1,If(@$(1)="Sec",-1,1)))
CLS
Var Time1$="30.04.2013 19:15:10"
Var Time2$="02.05.2013 19:00:00"
print Time1$
print Time2$
print
print DTBetween("Year",Time1$, Time2$);" year(e)"
print DTBetween("Month",Time1$, Time2$);" month(e)"
print DTBetween("Day",Time1$, Time2$);" day(e)"
print DTBetween("Hour",Time1$, Time2$);" hour(n)"
print DTBetween("Min",Time1$, Time2$);" Minute(n)"
print DTBetween("Sec",Time1$, Time2$);" second(n)"
waitinput
|
| | | | |
| | Julian Schmidt | so can sowohl a Datumsstring as well as one Time use
Def @Date(1) dt("setDateTime",val(substr$(@$(1),3,".")), val(substr$(@$(1),2,".")), val(substr$(@$(1),1,".")), val(substr$(substr$(@$(1),-1," "),1,":")), val(substr$(@$(1),2,":")), val(substr$(@$(1),3,":")), 0)
Def @DTBetween(3) If(@$(1)="Year",1899,If(@$(1)="Month",12,If(@$(1)="Day",30,0)))-dt("Get"+@$(1), @!(2)-@!(3))*If(@$(1)="Hour",-1,If(@$(1)="Min",-1,If(@$(1)="Sec",-1,1)))
CLS
Var Time1!=Date("24.12.2012 12:00:00")
Var Time2!=!Now
print dt("DateTimeStr", "dd.mm.yyyy hh:nn:ss", Time1!)
print dt("DateTimeStr", "dd.mm.yyyy hh:nn:ss", Time2!)
print
print DTBetween("Year",Time1!, Time2!);" year(e)"
print DTBetween("Month",Time1!, Time2!);" month(e)"
print DTBetween("Day",Time1!, Time2!);" day(e)"
print DTBetween("Hour",Time1!, Time2!);" hour(n)"
print DTBetween("Min",Time1!, Time2!);" Minute(n)"
print DTBetween("Sec",Time1!, Time2!);" second(n)"
waitinput
|
| | | | |
| | | | - Page 2 - |
| | holmol93 | Boah many Thanks for Your helpful Answer!
The function has perfect functions and erfüllt the, what tappt im dunkeln make should!
my software rechnet always The Margins between two IN and OUT Stempeln from and add The differences each to Tagesarbeitszeit.
Greetz and Merci for numerous Answer
danny |
| | | | |
| | Julian Schmidt | Joa, no trouble.
so can incidentally too integrally simply Counter building.
Def @Date(1) dt("setDateTime",val(substr$(@$(1),3,".")), val(substr$(@$(1),2,".")), val(substr$(@$(1),1,".")), val(substr$(substr$(@$(1),-1," "),1,":")), val(substr$(@$(1),2,":")), val(substr$(@$(1),3,":")), 0)
Def @DTBetween(3) stature$("00",Str $(If(@$(1)="Year",1899,If(@$(1)="Month",12,If(@$(1)="Day",30,0)))-dt("Get"+@$(1), @!(2)-@!(3))*If(@$(1)="Hour",-1,If(@$(1)="Min",-1,If(@$(1)="Sec",-1,1)))))
Declare Time2!, Time1!
User Messages 513, 516
Windowstyle 1024+16+64
Cls 0
SetWindowPos %hwnd= 100,100 - 209,34;-1
WhileNot (getfocus(%hwnd) and iskey(27)) or (%umessage=516)
Case %uMessage=513 : SendMessage(%hwnd,$112,$F012,0)
Time1!=!Now
Time2!=Date("07.05."+ Str $(Val(Substr$(Date$(0),-1,"."))+1)+" 00:00:00")
Text Color 0,RGB(180,180,220)
UseFont "Sans Serif",30,0,1,0,0
DrawText 3, 2, \
DTBetween("Year",Time1!, Time2!)+"."+\
DTBetween("Month",Time1!, Time2!)+"."+\
DTBetween("Day",Time1!, Time2!)+" "+\
DTBetween("Hour",Time1!, Time2!)+":"+\
DTBetween("Min",Time1!, Time2!)+":"+\
DTBetween("Sec",Time1!, Time2!), 0
Waitinput 1000
EndWhile
|
| | | | |
|
AnswerTopic-Options | 19.091 Views |
Themeninformationenthis Topic has 4 subscriber: |