I need to update an invoice value that currently "Invoice Date: Due Upon Receipt”. I need to make it read "June 1, 2020". After June 1, 2020 it will need to revert back to read "Due Upon Receipt".
I am trying to figure it out, but I cannot adjust my machine's date settings because they are managed by the company. So I am using a date of February 1, 2020 instead.
I would like to ask if how I am doing my query that returns the desired value, looks correct or if I need to make a change to make it more efficient.
This is what I got:
SELECT
CASE
WHEN CONVERT(DATETIME, FLOOR(CONVERT(FLOAT, GETDATE()))) >= '02/01/2020'
THEN 'Due Upon Receipt'
ELSE 'February 1, ' + CAST(YEAR(GETDATE()) AS VARCHAR(4)) [Due Date]
END
date(or other date time data type) column, not avarchar. Then you should have a different column for the "status"(?), which can have the valueNULL, until needed.ENGLISH(notBRITISH) because they pass dates in the formatyyyy-MM-ddto adatetimecolumn... (don't get me started on the fact that I specifically asked them if their application was language agnostic, and was told "yes"... We almost a whole day cause of their stupidity). Just because you think everything is American doesn't mean it will be.