当前日期作为每月的第一天 [英] Present date as first day of the month

查看:24
本文介绍了当前日期作为每月的第一天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Google 表格中,我正在寻找一个数组公式来提供给定日期的一个月的第一天.例如如果 A1 是 1/17/12 20:30 B1 将读取 1/1/12 等等.该公式必须保留日期格式,以便我可以在本例中的 B 列上按日期排序.

In Google Sheets I'm looking for an array formula to provide the first day of a month for a given date. e.g. If A1 is 1/17/12 20:30 B1 would read 1/1/12 and so on. The formula must keep the date format so that I can sort by date, on column B in this example.

推荐答案

我认为您可以使用 DATE 公式编写"一个新日期.例如

I think you could just "compose" a new date using the DATE formula. e.g.

=Date(Year(A1);Month(A1);1)

这篇关于当前日期作为每月的第一天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆