Workout the days between 2 dates and converting different currencies - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Workout the days between 2 dates and converting different currencies

Last post 08-16-2010 07:54 AM by sanvir. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-12-2010 06:54 AM

    • sanvir
    • Top 500 Contributor
      Male
    • Joined on 03-03-2010
    • South Africa
    • Posts 30

    Workout the days between 2 dates and converting different currencies

     Hi,

    I am making an international expense claim form for a client.
    on the form, i have two date fields (date from and Date to). i also have a days field which has to work out the amount of days between the two dates.

    i have tried the datediff function but i cannot get it working. Is there possibly an easier way of doing this as i have no experience with visual basic and i am trying everything i can find.

     

    the other thing i wanted to find out is working out different currencies:

    for instance i have 3 exchange rate fields. I would put in the South African Rand value of these rates.

    i would multiply 1 exchange rate amount with the foreign amount to get the rand value.
    once the values are worked out, how would i add them up to get a total?

    It sounds confusing, but i have attached a picture of the form to give you more/less an idea of what im trying to do.

    Thanks in advance!


  • 08-12-2010 06:55 AM In reply to

    • sanvir
    • Top 500 Contributor
      Male
    • Joined on 03-03-2010
    • South Africa
    • Posts 30

    Re: Workout the days between 2 dates and converting different currencies

     i havent added the fields for the other exchange amounts, as i am trying to get one portion of it working..

  • 08-12-2010 07:56 AM In reply to

    • sanvir
    • Top 500 Contributor
      Male
    • Joined on 03-03-2010
    • South Africa
    • Posts 30

    Re: Workout the days between 2 dates and converting different currencies

     this is what i have tried for the exchange amounts:

     

                Dim rate1 As String
                Dim Randamt1 As String
                Dim foramt1 As String


                rate1 = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:Rate1", NamespaceManager).Value
                Randamt1 = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:Randamt1", NamespaceManager).Value
                foramt1 = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:Foramt1", NamespaceManager).Value

                Randamt1 = foramt1 * rate1

    These field data types are all: text (string)

     

  • 08-13-2010 10:25 AM In reply to

    Re: Workout the days between 2 dates and converting different currencies

  • 08-16-2010 07:54 AM In reply to

    • sanvir
    • Top 500 Contributor
      Male
    • Joined on 03-03-2010
    • South Africa
    • Posts 30

    Re: Workout the days between 2 dates and converting different currencies

     Hi Alec,

    I have used your codeless method, but i get an error when i choose the first date, saying that some rules were not applied.

    Thanks again for the help!

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.