Desktop version

Main > Forum > 1C:Enterprise Platform > Studying 1C:Enterprise platform > Compare two Dates

Forum

Search UsersRules
Compare two Dates
#1
Active user
Points:: 0
Joined:: Sep 16, 2011

There are two dates: 07/25/2010 and 12/30/2011. I need to find out what is the difference between those dates in months.

Profile
#2
Just came
Points:: 9
Joined:: Dec 6, 2011

12 * (Year(Date2) - Year(Date1)) + Month(Date2) - Month(Date1)

Also in query you can use DATEDIFF(Date1, Date2, MONTH)

Profile
#3
Active user
Points:: 3
Joined:: Sep 16, 2011

Super, Evgeny! Thank you!

Profile
#4
Active user
Points:: 0
Joined:: Sep 16, 2011

Yes, that helped, thank you!

Profile
#5
Just came
Points:: 9
Joined:: Dec 6, 2011

You are welcome )

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.