Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TIME() without the colons

Status
Not open for further replies.

jamie2

Programmer
Jul 26, 2005
1,127
0
0
US
I am new to REXX and would like to know if you can transmit TIME() without the colons between the HR:MIN:SEC?
 
I was able to use TRANSLATE to get the date format I wanted, now I am stuck on the date format.

I am communicating to a Nortel 81C PBX and the date format on DATE() is 5 May 2008. My pbx is expecting the date format of 05 05 2008. I am unable to figure out how to use TRANSLATE to get the date format correct.
 
May 5th" is a bad day to use because both the month and the day are "5".

Do you need "MM DD YYYY" or "DD MM YYY"?


Frank Clarke
Support the Troops:
-- Bring them home.
 
Thanks, but I figured it out. I needed the format MM DD YYYY.

I used the following to get it.

date1 = translate('78 56 1234', date('S'), '12345678')
 
Exactly, but for ease-of-understanding, I would use
Code:
Translate( "Mm Dd CcYy", date("S"), "CcYyMmDd" )

Frank Clarke
Support the Troops:
-- Bring them home.
 
Frank, thanks for the suggestion and I will update my script as you show. That makes more sense.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top