Search code examples
infopath2010

InfoPath 2010 changing Date/Time/second Formula


I have this formula in a textbox to generate the date, time, and seconds. I want to format the date to mm/dd/yyyy instead of yyyy/mm/dd

translate(now(), "_-:T", "")

Solution

  • Use functions concat, substring, translate

    concat(substring(translate(now(), "_-:T", ""), 5, 2), "/", substring(translate(now(), "_-:T", ""), 7, 2), "/", substring(translate(now(), "_-:T", ""), 1, 4))
    

    OUTPUT: 09/12/2014