How to get the server current date in php4 - php4

I am using date("Y-m-d") its working fine in php5. But it displays wrong results in php4.
How can I get today's date in php4?

Related

Looker Studio: Upgrading Date Compatibility to Date clears out graphs or results in Failed to get data

I have a dashboard in Looker Studio that is suddenly showing inaccurate data (it worked fine the day before).
I had added a column to a data source. When I reconnected the data source, I can see that the date format is showing the old date format, YYYYMMDD (I don't recall seeing that before).Previously the date format in this Google Sheet was formatted as Jan 2023 (01/01/2023 in the formula bar). I changed the format to MM/DD/YYYY. There were still inaccuracies in the graphs.
I tried to upgrade from Date Compatibility to Date and the graphs are blank or have an error message, see below.
Date Compatibility/old date format
Empty graph
Failed to get data message
I have one data source that is the old date format.
I upgraded from Date Compatibility (YYYYMMDD) to Date. The format in Google Sheets is MM/DD/YYYY.
The charts went blank or I received an error message "Failed to get data"
I then went into the date fields in the blend and in the chart, removed the old date fields and entered them in again.
The charts are either still empty or have the error message.

How do I pull the week of the month from text strings in this Twilio format 2019-08-22 06:12:58 MDT?

I am using the Twilio log file to crunch some data and need to convert the Twilio format for dates into something that Google Sheets can recognize as a date so I can then extract what week of the month the date is referring to. Also would be helpful to get the syntax that converts the Twilio date to a recognizable date for Googlesheets in case there are other things I need to do with the date field.
Currently, this is the format in the log file: "2019-08-22 06:12:58 MDT"
I'm using this =text(index(split(I2," "),,1),"mmmm") to determine the month and am struggling to have this now be able to work with the WEEKNUM function of Googlesheets to get the number of the week the date is from. I've tried =DATE(index(split(I2," "),,1),"mmmm"), =WEEKNUM(index(split(I2," "),,1),"mmmm") but am terrible with the formula syntax and can't fix the date value.
=DATE(index(split(I2," "),,1),"mmmm")
I expect to see a value from 1-5.
The text() part of the formula is turning the date input into text. And so you can't use it to calculate the weeknum().
=weeknum(index(split(I2," "),,1)) will get you closer. But it will give you the week of the year.
You may want to see this for a way to get to week of the month from week in the year.

Getting the Date in stencil bigcommerce

I'm setting up a minimum and maximum number of days a customer can return a product. But my problem is that how can I get the current Date on stencil bigcommerce? I tried using the
{{moment "now" "MM/DD/YYYY"}}
It works great but the problem is that when I change the current date of my computer the output of the code changes also. That is why I wanted to get like the "Server Date", just to be sure I will always getting the correct current date.

Having an issue with ascertaining the format of a date

I've been tasked with getting data from an existing database table and transferring it into another. Everything is fine except the date in the original table is in a format that I don't recognise. It looks suspiciously like a unix timestamp but when converting it it seems to be coming out as the year 2727 or something.
Here is an example of what's in the existing table: 1424786878240
The matching date for this on the front end of the site is 24th February 2015. I cannot seem to find any correlation between this and the number in the database - and since I have no access to the original site code I am unable to determine how it's being converted.
If anyone recognises this date format / structure I would appreciate some help.

Using Current Date Time in SAS

I am selecting the data from a table using a date string. I would like to select all rows that have a update time stamp greater than or equal to today.
The simplest way that I can think of is to put today's date in the string, and it works fine.
WHERE UPDATE_DTM >'29NOV2016:12:00'DT;
However, if I want to put something like today's date or system date, what should I put?
I used today(), but it returned all rows in the table. I am not sure if it's because today() in SAS refers to the date 1/1/1960? I also tried &sysdate, but it returned an error message seems like it requires a date conversion.
WHERE UPDATE_DTM > TODAY();
Any ideas? Your thoughts are greatly appreciated!
DATETIME() is the datetime equivalent of TODAY() (but includes the current time). You could also use dhms(TODAY(),0,0,0) if you want effectively midnight (or, for your example above, dhms(TODAY(),12,0,0) to get noon today).