My first suggestion is that you study the documentation for the "safe" function and use it correctly. Pay attention to the number and types of the arguments and the return value. This function doesn't return a pointer to a tm instance.
Now it looks like you also need to read the documentation for asctime_s() and use the correct number and types of parameters and pay attention to the value that this function returns.
I really don't understand what you don't understand (from the page you provided):
Return Value
Zero if successful. If there is a failure, the invalid parameter handler is invoked, as described in Parameter Validation. If execution is allowed to continue, the return value is an error code. Error codes are defined in ERRNO.H. For more information, see errno Constants. The actual error codes returned for each error condition are shown in the following table.
Do you realize that this is a non-standard compiler specific function*? The C++ standard doesn't support these "safe" functions.
You need to print the first parameter, not the return value. The return value only tells you if the function succeeded.
* Although the C11 standard specifies these functions as optional, C++ doesn't yet support these "safe" functions. And by the way they are only "safe" when you use them properly, which you're still not doing. This function takes three arguments, not two.
Perhaps you should consider using the standard C functions localtime() and asctime() instead.