now() function question - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

now() function question

Last post 05-31-2019 12:33 PM by Travis_H. 20 replies.
Page 2 of 2 (21 items) < Previous 1 2
Sort Posts: Previous Next
  • 01-10-2016 05:32 PM In reply to

    Re: now() function question

    You are a genius the only thing I would add to this is that if you copy and past his code into an existing concat remove one parantacy from the front and one paranthacy from the end. BUT THANK YOU SO MUCH.... example of it working concat(Node, "_Sweep", "_", number(substring(now(), 6, 2)), "-", number(substring(now(), 9, 2)), "-", number(substring(now(), 1, 4)), "_", PM Tech #, ".xls") SO if you just want to copy it into your concat copy that: number(substring(now(), 6, 2)), "-", number(substring(now(), 9, 2)), "-", number(substring(now(), 1, 4)), Be sure to have a space before any needed comma and only have one comma at the end before the next set of text/field.
  • 05-31-2019 11:42 AM In reply to

    Re: now() function question

    Hi Hilary, The function you wrote worked for me. "concat(number(substring(now(), 9, 2)), "_", number(substring(now(), 6, 2)), "_", number(substring(now(), 3, 2)), "_", substring(now(), 12, 5))" Just one more piece that I need help with. My SharePoint Sever is 3 hrs off from my time. Normally I would add '+(3/24)' to the end of a Now() function, but I can't get that to work. So how would I be able to increase the time piece of your function by 3 hours?
  • 05-31-2019 11:48 AM In reply to

    Re: now() function question

    You should be able to use the addMinutes function to add 3 hrs to a datetime. Let me know if you need more info.
    Hilary Stoupa

  • 05-31-2019 11:59 AM In reply to

    Re: now() function question

    Thanks I keep getting an error.. can you show me how that would look in the function in the message I sent above?
  • 05-31-2019 12:06 PM In reply to

    Re: now() function question

    Sorry - add seconds, not minutes: concat(number(substring(xdDate:AddSeconds(xdDate:Now(), 10800), 9, 2)), "_", number(substring(xdDate:AddSeconds(xdDate:Now(), 10800), 6, 2)), "_", number(substring(xdDate:AddSeconds(xdDate:Now(), 10800), 3, 2)), "_", substring(xdDate:AddSeconds(xdDate:Now(), 10800), 12, 5))
    Hilary Stoupa

  • 05-31-2019 12:33 PM In reply to

    Re: now() function question

    Perfect! It worked! THANKS
Page 2 of 2 (21 items) < Previous 1 2
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.