• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

how to get difference of dates

CHARAN

New Member
ddmmyy

28022011 and 01032011

I get a very high value, acutally the diff is 1 day

let me know how


Thnaks in advance.
 
For Year


=DATEDIF(E12,TODAY(),"y")

=DATEDIF(StartDate,EndDate,"y")


For Months


=DATEDIF(E12,TODAY(),"ym")

=DATEDIF(StartDate,EndDate,"ym")


For Days


=DATEDIF(E12,TODAY(),"md")

=DATEDIF(StartDate,EndDate,"md")


http://chandoo.org/forums/topic/workdays
 
Charan,

Are the values you have dates, formatted to look like that, or do you really have the numbers

28,022,011

and

1,032,011?


Since you got a high number, I'm assuming the latter. My recommendation would be to fix the data to a proper date so that XL handles it correctly. If that's not an option, we'll need to use some text manipulation functions to rearrange everything correctly.
 
Back
Top