C/C++ : datenum code

Matlab have a function to convert string of date to double number. This double number represent preset day from (January 0, 0000). This function name is “datenum”. I want to use this function in C/C++.  I have research this function and create a simple code how to use datenum in our C/C++ code (convert datenum to C/C++) . Please check the full code below :

Compile this program using command :

Running the program :

If you check using Matlab, this output have same result.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.