Skip to content
Loading
  • 0
    select DATEDIFF(day,convert(datetime,'30-11-2016',104),getdate())
    This will give you the difference in days
    If you want month or year replace day with month or year
    0
  • 0
    I would want to do it in c#.
    0
  • Ananth G
    0
    Vasanti
    answer is correct
    0
  • Bikesh Srivastava
    0
    Use like this .i have already done.
    1. usingSystem;
    2. usingSystem.Net.NetworkInformation;
    3. usingSystem.Net;
    4. usingSystem.Net.Sockets;
    5. usingSystem.Text.RegularExpressions;
    6. namespaceExample
    7. {
    8. classProgram
    9. {
    10. staticvoidMain()
    11. {
    12. strings1="WhenyouarewritingservercodeyoucanneverbesurewhattheIPaddressyouseeisrefereeingto.Infactsomeuserslikeitthisway.";
    13. strings2="WhenyouarewrtingservercodeyucannnneverbesurewhattheIPaddressyouseeisreferingto.Infactsomeuserslikeitthisway";
    14. string[]tempArr1=s1.Split('');
    15. string[]tempArr2=s2.Split('');
    16. intcounter=0;
    17. for(inti=0;i
    18. {
    19. if(tempArr1[i]!=tempArr2[i])
    20. {
    21. Console.WriteLine(tempArr1[i]+","+tempArr2[i]);
    22. counter++;
    23. }
    24. }
    25. Console.WriteLine("TotalModifiedWord::"+counter);
    26. Console.ReadLine();
    27. }
    28. }
    29. }
    0