This blog post by Yegor shows us how to format date output under FreeBSD.
How do I format date to display on screen on for my shell scripts as per my requirements on Linux or *BSD operating systems?
You need to use the standard date command to format date or time. You can use the same command with the shell script.
Syntaxdate +"%FORMAT"date +"%FORMAT%FORMAT"date +"%FORMAT-%FORMAT"Open a terminal and type the following date command:date -j +“%Y-%m-%d %H:%M:%S”Sample output:2014-08-1816:57:59
Check out the post here with full instructions: http://blog.yegorgavrilov.com/2014/10/howto-format-date-output-under-freebsd.html