excel - Using TODAY() in YYYY-MM-DD format with Conditional Formatting in Excel
问题描述
In Excel, is there a way to format TODAY() into the YYYY-MM-DD format? I've setup Conditional Formatting so that if a cell =TODAY(), the entire row becomes bold. However, it only works when the dates are in standard MM-DD-YYYY format. Any suggestions?
Current Conditional Formatting formula looks like this:
=$B1=TODAY()
The date cells, which come from an external database are stored as YYYY-MM-DD in column 'B'.
Thank you in advance!
解决方案
Then one of two things. Your date is text and not a true date, or there is a time component to your date that the format is hiding.
For the prior, text instead of date, use:
=$B1=TEXT(TODAY(),"YYYY-MM-DD")
But the better solution is to change the text to a date or remove the time part. Either will be done with this formula:
=INT(--$B1) = TODAY()
推荐阅读
- javascript - 单击子组件中的按钮仅有效一次
- javascript - 将数字(也是浮点数)转换为十六进制,反之亦然
- kubernetes - 错误:src 或 dest 之一必须是远程文件规范
- javascript - 在调用内容时未修改 Javascript 中传递给构造函数的数组
- reactjs - React-window grid:如何获取项目的真实索引而不是当前列的?
- react-native - 从 axios.get 响应中获取 url
- javascript - JavaScript 解构理解的问题
- javascript - 字符串操作javascript
- android - android 会自动打开短信中的链接(谷歌会扫描我的短信)吗?
- postgresql - 在流复制过程中发送 Postgres 复制大小