It is currently 6 June 2025, 16:20 Advanced search

DATEVALUE() function?

Questions and answers on how to best use Instant Developer

DATEVALUE() function?

Postby john w » 28 May 2025, 21:30

I need to convert a Date in InDe to a serialized number like in Excel or Google Sheets. I am looking for something like this "The DATEVALUE function is used in Excel and Google Sheets to convert a date represented as text into a serial number that can be used in date calculations. This serial number represents the number of days that have passed since January 1, 1900."

How do I achieve something like this in Instant Developer. I need to use the date numbers in a Slope calc.

Any help is appreciated.
Regards

John W
User avatar
john w
 
Posts: 849
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: DATEVALUE() function?

Postby d.pierangeli » Yesterday, 14:27

Should be sufficient to convert the date into an integer:

int i = toInteger(now())

The result should be the days after 12/30/1899.
User avatar
d.pierangeli
Pro Gamma
Pro Gamma
 
Posts: 8128
Joined: 30 September 2010, 15:35

Re: DATEVALUE() function?

Postby john w » Yesterday, 15:25

Thank you that was what I was looking for! I did not see it in the documentation, it might be worth adding if it is not there.
Regards

John W
User avatar
john w
 
Posts: 849
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA


Return to Tips & Tricks

Who is online

Users browsing this forum: Google [Bot] and 14 guests

cron