Skip to main content
1-Visitor
Nov 19, 2020 7:48 AM UTC
Solved

date and time

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)

LucMeekesAnswer
23-Emerald V
Nov 19, 2020 9:19 AM UTC

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

6 replies

LucMeekes23-Emerald VAnswer
23-Emerald V
Nov 19, 2020 9:19 AM UTC

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

Translate
1-Visitor
Nov 19, 2020 9:55 AM UTC
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
Translate
terryhendicott
21-Topaz II
Nov 19, 2020 12:52 PM UTC

Hi

Here is some Mathcad 15 time functions.

Perhaps someone can transcribe to Prime

 

Cheers

Terry

Translate
23-Emerald V
Nov 19, 2020 1:13 PM UTC

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

 

Luc

Translate
Werner_E
25-Diamond I
Nov 19, 2020 1:19 PM UTC

How about

Werner_E_0-1605791967060.png

 

Translate