Re: Formatting Date (m/d/yyyy) To Timestamp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 10, 2021, at 6:17 PM, Talin Sharma <talinsharma.in@xxxxxxxxx> wrote:
> 
> Hi All,
> 
> I have a string: '1/1/2021'. I want to turn this into a timestamp for entering into MySql. I have tried everything I could find. Please let me know how to proceed. 
> 
> Also, let me know if you need more information.
> 
> 
> Thanks:
>      Talin Sharma


Talin:

Look up strtotime() in the PHP manual, namely:

   https://www.php.net/manual/en/function.strtotime.php

To see it run, try this:

   https://strtotime.co.uk/?str=1%2F1%2F2021

If you don’t want to code, then use the above site and get the Unix Timestamps you want.

Cheers,

Tedd

Tedd Sperling
tedd@xxxxxxxxxxxx




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux