To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI calculates the timestamp of the next specified weekday and provides dates of X following weeks as well.
Description
The current timestamp is used to determine the current day of the week. This day of the week is them compared to the user specified day of the week and seconds are added to the timestamp based on that difference to get a new timestamp corresponding to the user specified day. This is output as "Date of Next Specified Day." A for loop is then used to generate a number of dates corresponding to that day of the week.
For example, if the user wants to determine the date of the next Thursday, they can select Thursday using the "Find Next" enemy and then run the code. The code will return the date of the next Thursday as well as the dates of the following X Thursdays where X is specified by the user as "Number of Occurrences to Calculate."
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet of Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange. **
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.