Notifications
Clear all

[Closed] difference between two dates

Trying to script way to find time difference between two dates. Is pretty easy finding time involving hrs,mins,secs but days and years is different with every month having different days. Any easy solution t this?

6 Replies
 i might be too old to answer this kind of questions right. but... take both dates. that's only the way to get a difference. IMHO :)

now is seriously… .NET has to have it. check the DateTime …

 lo1

Is there a way to set the datetime instead of using ‘.now’? finding that all properties are read-only. Am also experimenting with ‘MonthCalendar’ as mentioned in maxscript help file. Can set the date using mouseclick but wanting to change properties from spinner values as well.

1 Reply
 lo1
(@lo1)
Joined: 11 months ago

Posts: 0

There are a lot of different constructors on that page. For example:

a = dotnetObject "System.DateTime" 2013 04 04

Thanks that pointed me in right direction. As I thought was incredibly easy and in front of me whole time.


Time_Start = dotnetObject “System.DateTime” (Year_Start) (Month_Start) (Day_Start) (Hour_Start) (Minute_Start) (Sec_Start)
Time_Stop = dotnetObject “System.DateTime” (Year_Stop) (Month_Stop) (Day_Stop) (Hour_Stop) (Minute_Stop) (Sec_Stop)