Platforms to show: All Mac Windows Linux Cross-Platform
/Util/DateDifference/DateDifference
Required plugins for this example: MBS Util Plugin
Last modified Sun, 17th Mar 2012.
You find this example project in your MBS Xojo Plugin download as a Xojo project file within the examples folder: /Util/DateDifference/DateDifference
Download this example: DateDifference.zip
Project "DateDifference.xojo_binary_project"
FileTypes
Filetype Text
End FileTypes
Class Window1 Inherits Window
EventHandler Sub Open()
dim d as DateDifferenceMBS
dim s,e as date
s=new date
e=new date
e.Year=e.Year+5
e.Month=1
e.Day=4
e.Hour=2
e.Minute=6
e.Second=7
d=s.DifferenceMBS(e)
MsgBox str(d.day)+"."+str(D.Month)+"."+str(D.Year)+" "+str(d.Hour)+":"+str(d.Minute)+":"+str(D.second)
'd=new DateDifferenceMBS
'
'if d.Calc(s,e) then
'MsgBox str(d.day)+"."+str(D.Month)+"."+str(D.Year)+" "+str(d.Hour)+":"+str(d.Minute)+":"+str(D.second)
'else
'MsgBox "Failed"
'end if
End EventHandler
End Class
MenuBar MenuBar1
MenuItem UntitledMenu1 = ""
MenuItem FileMenu = "&File"
MenuItem FileQuit = "Quit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu0 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project
See also:
Download this example: DateDifference.zip
The items on this page are in the following plugins: MBS Util Plugin.