Skip to main content
19-Tanzanite
October 3, 2010
Question

Date Calendar and Time functions.mcd

  • October 3, 2010
  • 21 replies
  • 13740 views

Here is a selection of functions for dates, calendars, and times. Also included is a calendar component that allows a date to be selected by the user. The scripted components were all written by me, but the additional functions at the end of the worksheet were not. In fact, I don't know who did write some of them, but if the author of those functions, or someone who knows who the author is, reads this then please let me know who did write them so I can credit them correctly.

Jun 09 2015: Added a worksheet for Mathcad Prime. This includes only the limited set of functions not based on scripted components.

21 replies

1-Visitor
October 4, 2010

does it contain some excel objects. As i'm seeing weird images in the file.

Using Mathcad 14.0.0.163

RichardJ19-TanzaniteAuthor
19-Tanzanite
October 4, 2010

No. It contains two functions written as scripted components though. Those functions are based on ClipArt objects (for no particularly good reason - just a whim), so perhaps that is what you are seeing.

1-Visitor
October 4, 2010

it would be nice if i can extract the individual parts from CurrentDateAndTime function.

for eg.

CurrentDateAndTime("Year") should give me just the year part in integer not string so i can perform calculations on them.

Also in your question how many days have passed since start of year. it should automatically pick the start of the year. rather than having me enter it manually. So is the date is in 2003 it should automatically pick 1/1/2003.

RichardJ19-TanzaniteAuthor
19-Tanzanite
October 4, 2010

it would be nice if i can extract the individual parts from CurrentDateAndTime function.

for eg.

CurrentDateAndTime("Year") should give me just the year part in integer not string so i can perform calculations on them.

I added two more functions

Also in your question how many days have passed since start of year. it should automatically pick the start of the year. rather than having me enter it manually. So is the date is in 2003 it should automatically pick 1/1/2003.

That's also taken care of by the new functions.

1-Visitor
October 5, 2010

thanks richard this is great addition

i think if just a time is given it should be assumed to be current date rather than dec 1899

1-Visitor
October 5, 2010

Oh the second term in split function is quarter. hmmm

1-Visitor
October 5, 2010

The attached image just sank my computer when trying to open.

If saved on my hardrive the image cannot be seen.

Mike

1-Visitor
October 5, 2010

it was my mistake. there is nothing wrong with the function. I didn't realize that the second term is a quarter not month.

btw how did you manage to show your SplitDate function as (2010 1 2 4 X X X X)

mine is showing as a table. is that an alternative way to show a vector.

1-Visitor
October 5, 2010

Double left click on the result of the function, select "Display Option" tab and change the matrix display style to a Matrix.

Mike

RichardJ19-TanzaniteAuthor
19-Tanzanite
October 5, 2010

The attached image just sank my computer when trying to open.

If saved on my hardrive the image cannot be seen.

What image are you talking about?