Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 13 maj 2012 · PHP DateTime can be echoed, but what i want to process my DateTime with PHP string functions. My question is how can I make PHP dateTime Object to a string starting from this kind of code: $dts = new DateTime(); //this returns the current date time echo strlen($dts);

  2. The first method we recommend to use for converting the DateTime object to a string is format. Here is the code to run: <?php $date = new DateTime ( '2000-01-01' ); $result = $date -> format ( 'Y-m-d H:i:s' ); ?>

  3. 3 paź 2005 · The strtotime () function parses an English textual datetime into a Unix timestamp (the number of seconds since January 1 1970 00:00:00 GMT). Note: If the year is specified in a two-digit format, values between 0-69 are mapped to 2000-2069 and values between 70-100 are mapped to 1970-2000.

  4. 20 sie 2024 · The date() function in PHP can be used to format a timestamp into a human-readable string. By using the getTimestamp() method of the DateTime object, you can get the Unix timestamp and then format it with the date() function.

  5. 31 lip 2022 · You can represent an exact date and time in PHP using the built-in DateTime object. Creating one is simple, just pass it a string in the format YYYY-MM-DD HH:MM:SS. The problem is that sometimes you want to go from a DateTime object back to a string. In this post, we'll learn how to convert a DateTime object to a string in PHP.

  6. 16 sty 2023 · This article demonstrates how to convert a DateTime object to a string in PHP. You can use the format() function of the DateTime class to convert a DateTime object to string in PHP. The DateTime::format function returns the date formatted according to the given format.

  7. In PHP, we can convert a DateTime object to a string using the format() method. This method allows us to specify the format in which we want to display the date and time. Here is an example code snippet that demonstrates how to convert a DateTime object to a string in PHP:

  1. Ludzie szukają również