Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. convert datetime to decimal

convert datetime to decimal

Scheduled Pinned Locked Moved Windows Forms
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    srinivassam
    wrote on last edited by
    #1

    Hi all, i am facing one problem in my windows application, DateTime days; DateTime day1; DateTime day2; day1 = (Convert.ToDateTime(dtdata1.Rows[0]["firstrepaymentduedate"])); day2=(Convert.ToDateTime(dtdata1.Rows[0]["trenchdate"])); decimal interestrate; int outstandingamount; decimal interestamount = (outstandingamount * interestrate * days) / 365; here days is in datetime but interestamount is decimal. so we are getting error in converting datetime to decimal please any body knows this solution please give reply to me as soon as possible thanks & regards sarp

    sarp

    D 1 Reply Last reply
    0
    • S srinivassam

      Hi all, i am facing one problem in my windows application, DateTime days; DateTime day1; DateTime day2; day1 = (Convert.ToDateTime(dtdata1.Rows[0]["firstrepaymentduedate"])); day2=(Convert.ToDateTime(dtdata1.Rows[0]["trenchdate"])); decimal interestrate; int outstandingamount; decimal interestamount = (outstandingamount * interestrate * days) / 365; here days is in datetime but interestamount is decimal. so we are getting error in converting datetime to decimal please any body knows this solution please give reply to me as soon as possible thanks & regards sarp

      sarp

      D Offline
      D Offline
      darkelv
      wrote on last edited by
      #2

      Use TimeSpan.Days. also don't ask us to reply as soon as possible...

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups