Now() function - InfoPath Dev
in

InfoPath Dev

Now() function

Last post 09-06-2019 09:47 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-05-2019 12:58 AM

    • erzon
    • Top 500 Contributor
    • Joined on 08-03-2019
    • Posts 39

    Now() function

    Hi is it possible to add like 12 hours once you extract the time from now() function?
    Filed under: ,
  • 09-05-2019 08:36 AM In reply to

    Use the addSeconds function - but I'd probably add that first, then use substring-after to get the time. See attached - save the file locally, right click & select Design. Formula is: addSeconds(now(), 43200)
    Hilary Stoupa

  • 09-06-2019 09:24 AM In reply to

    • erzon
    • Top 500 Contributor
    • Joined on 08-03-2019
    • Posts 39
    Hilary Stoupa:
    Use the addSeconds function - but I'd probably add that first, then use substring-after to get the time. See attached - save the file locally, right click & select Design. Formula is: addSeconds(now(), 43200)
    is 43200 equivalent to 12 hrs? so for example the date now and time is Sept 7 11PM so if I add that function it will become Sept 8 11AM?
  • 09-06-2019 09:47 AM In reply to

    Yup - did you see my sample form? You can just use Google to figure out the math.... but if you need to do it in your form (like, user types in the number of hours) you can multiply the field with the hours to add by 3600, which is the number of seconds in an hour.
    Hilary Stoupa

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