cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

date and time

jgreenwood
7-Bedrock

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)

ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:jgreenwood)

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

View solution in original post

6 REPLIES 6
LucMeekes
23-Emerald III
(To:jgreenwood)

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

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

Conversion to Primes 9.0.0.0 seems to be pretty ok.

 

Thanks!

Hi

Here is some Mathcad 15 time functions.

Perhaps someone can transcribe to Prime

 

Cheers

Terry

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

 

Luc

Werner_E
25-Diamond I
(To:LucMeekes)

How about

Werner_E_0-1605791967060.png

 

Announcements

Top Tags