Home » SQL & PL/SQL » SQL & PL/SQL » How to implement PHP sprintf in PL/SQL (Oracle 10g)
icon5.gif  How to implement PHP sprintf in PL/SQL [message #335262] Mon, 21 July 2008 11:46 Go to next message
**Snake**
Messages: 47
Registered: December 2005
Location: Italy
Member

Hi guys...I need your help.
I have this code in PHP:

$microTime = microtime();
   list($a_dec, $a_sec) = explode(" ", $microTime);

   $dec_hex = sprintf("%x", $a_dec* 1000000);
   $sec_hex = sprintf("%x", $a_sec);

....
....



I need to convert this code for a new PL/SQL function.

I need the reproduce the sprintf result.
I tried to convert my values in hex, but the result isn't the same o sprintf function.

Someone can help me ???

Thanks a lot !!!

[Updated on: Mon, 21 July 2008 11:47]

Report message to a moderator

Re: How to implement PHP sprintf in PL/SQL [message #335273 is a reply to message #335262] Mon, 21 July 2008 12:21 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Have a look at TO_CHAR function and associated format models.

Quote:
I tried to convert my values in hex, but the result isn't the same o sprintf function.

Where is this in your post?

Regards
Michel
Previous Topic: PL/SQL: ORA-04052: error occurred when looking up remote object
Next Topic: Auditing DML actions on multiple databases
Goto Forum:
  


Current Time: Sun Dec 04 15:01:59 CST 2016

Total time taken to generate the page: 0.22105 seconds