Convert system date and time

Here is an easy way to convert System Date and Time using built-in functions in just one line of code.

Here is an easy way to convert System Date and Time using built-in functions in just one line of code. Enjoy!

   
d wwTime    s      6  0 
d wwDate    s      8  0
 
   /free
    // Date

    wwDate = %Uns(%Char(%Date:*ISO0)
    
    // Time
    wwTime = %Uns(%Char(%Time():*ISO0)
    or
    wwTime = %Uns(%Char(%
Time():*HMS0)  


   /end-free
  

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: tips, tutorials and more.

Visit the ITKnowledge Exchange and get answers to your developing questions fast.

Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.


This was last published in November 2004

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close