set date to last Sunday in JScript - InfoPath Dev
in

InfoPath Dev

set date to last Sunday in JScript

Last post 08-26-2005 01:21 PM by Patrick Halstead. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-25-2005 07:51 AM

    set date to last Sunday in JScript

    I'm trying to do this but getting nowhere. The only code i've found is on the msdn website and it hangs up infopath causing it to lock up.
    All I want is when they open the form, it auto fills the date to the Sunday that just passed.
    Any body have any examples or ideas on this one?
  • 08-25-2005 04:43 PM In reply to

    Re: set date to last Sunday in JScript

    You will need to get the current day by calling GetDay and then break up today's date into its various components, subtract the appropriate number from the day component and set the date back using the all other components and the updated Day component. It should calculate the date correctly.

    Did you try to run the code in debugger to see what causes InfoPath to lock up?

    Shanthi
    InfoPath Dev India
    Shanthi Reddy
  • 08-25-2005 04:58 PM In reply to

    Re: set date to last Sunday in JScript

    Patrick added this in one of the recent forum posts. This has pretty simple code on how to subtract days.

    Hope this helps!

    Shanthi
    InfoPath Dev India
    Shanthi Reddy
  • 08-26-2005 06:35 AM In reply to

    Re: set date to last Sunday in JScript

    I looked for his post and could not find it. Would you link it for me?

    Thanks,
    Jeff
  • 08-26-2005 01:21 PM In reply to

    Re: set date to last Sunday in JScript

    Hi Jeff,

    You can search the forum by clicking on the search link in the upper right hand section. The search box in the upper left only searches the site. Sorry about that!

    Check this thread out:http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=713

    Cheers

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.