Skip to main content
1-Visitor
November 19, 2020
Solved

date and time

  • November 19, 2020
  • 2 replies
  • 4377 views

Does anyone know how to get Mathcad Prime 6 to return the Date and Time?

(I know about the time(z) function, its not what I'm looking for. I want to create a 'timestamp' that I can export into Excel with the associated calculation results)

Best answer by LucMeekes

You can (have to) convert the result of the time() function to the format you desire.

There is no built in function for that.

NOTE that MsExcel (probably depending on version) does NOT have a single date system.

What might help is if you take the following transformation:

LucMeekes_0-1605779662426.png

This adds the number of seconds between 1900-1-1 and 1970-1-1 to the output of time() and divides by the number of seconds in a day. That number can be transferred to excel and when the cell is properly formatted it will show you the (UTC I guess) date and time. Unless you're using a worksheet with 1904 date system.

 

Success!

Luc

2 replies

LucMeekes23-Emerald IVAnswer
23-Emerald IV
November 19, 2020

You can (have to) convert the result of the time() function to the format you desire.

There is no built in function for that.

NOTE that MsExcel (probably depending on version) does NOT have a single date system.

What might help is if you take the following transformation:

LucMeekes_0-1605779662426.png

This adds the number of seconds between 1900-1-1 and 1970-1-1 to the output of time() and divides by the number of seconds in a day. That number can be transferred to excel and when the cell is properly formatted it will show you the (UTC I guess) date and time. Unless you're using a worksheet with 1904 date system.

 

Success!

Luc

1-Visitor
November 19, 2020
Ok - looks like I have to do it myself. The system time looks very close to the number of seconds since 1 Jan 1970 so shouldn't be too difficult
21-Topaz II
November 19, 2020

Hi

Here is some Mathcad 15 time functions.

Perhaps someone can transcribe to Prime

 

Cheers

Terry

23-Emerald IV
November 19, 2020

I'll immediately admit I'm blind, but, I fail to see any of these functions using the output of the time() function...

 

Luc

25-Diamond I
November 19, 2020

How about

Werner_E_0-1605791967060.png