Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Get Business Date in VBA

(0) ShareShare
ReportReport
Posted on by 1,639

Hi there,

How do I get the business date (not todays date) using VBA?

Thanks

Jo

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: Get Business Date in VBA

    I may have to let someone else take a run at this.  I just tried fetching bpes.today under Customization Manager and could not make that work either.  It works fine under the SL toolkit for custom screens but it does appear that bpes is not available at the customization level.  I will continue to play around with this as time permits.

    Sorry.

  • Jo Wykerd Profile Picture
    1,639 on at
    RE: Get Business Date in VBA

    I see you are using bpres.today which I couldn't find.  I am using customisation manager.

    As for your date question I am not still in June!  In this country our date format is dd/mm/yyyy

  • Community Member Profile Picture
    on at
    RE: Get Business Date in VBA

    I just tested this under SL 2011 and it worked for me just fine.  I first looked at bpes.today with the business date not changed and it gave me 12/09/2013.  I then changed the business date to 12/04/2013 and looked at bpres.today and it now gave me 12/04/2013.  I did have to close the screen and re-open it after changing the business date because bpes is loaded during the form open event.

    I am running these tests in a project opened in VB.NET as opposed to Customization Manager.

    I am also a bit curious about the dates in your posting.  While I wish it was still June, it is, unfortunately, December in my world.  Also, were you really trying to change the business date to a future date?

  • Jo Wykerd Profile Picture
    1,639 on at
    RE: Get Business Date in VBA

    Hi Rick,  I am using SL2011

  • Community Member Profile Picture
    on at
    RE: Get Business Date in VBA

    What version of Dynamics SL are you using.  I tested my response before providing it and it worked fine but I tested in under SL 6.5.

  • Jo Wykerd Profile Picture
    1,639 on at
    RE: Get Business Date in VBA

    Hi Rick,

    Bpes.today shows todays date 6/12/13 if I change business date to 8/12/13 and it shows 4/12/13 if I leave business date as todays date (6/12/13).  it seems to show 2 days less than I have changed it to

  • Community Member Profile Picture
    on at
    RE: Get Business Date in VBA

    That is the business date.  The bpes table holds the business date in that field.  Try changing the business date and then look at that field in the table and it will contain the date you just set the business date to.

  • Jo Wykerd Profile Picture
    1,639 on at
    RE: Get Business Date in VBA

    Thanks Rick but I wanted business date which may not necessarily be the same as todays date.

    Any ideas?

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Get Business Date in VBA

    bpres.Today for the raw date or datetostrsep(bpes.Today) for the text date.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

#1
Community Member Profile Picture

Community Member 136

#2
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 102 Super User 2025 Season 1

#3
REUser Profile Picture

REUser 8

Featured topics

Product updates

Dynamics 365 release plans