Compute column collection

Source: Internet
Author: User

Get week of the year

= Date (year ([start time]), month ([start time]), Day ([start time]) + 0.5-weekday (date (year ([start time]), month ([start time]), Day ([start time]), 2) + 1

First day of the week for a given date:

= [Start date]-weekday ([start date]) + 1

Last day of the week for a given date:

= [End date] + 7-weekday ([end date])

First day of the month for a given date:

= Datevalue ("1/" & month ([start date]) & "/" & year ([start date])

Last day of the month for a given year (does not handle Feb 29). result is in date format:

= Datevalue (choose (month ([end date]), 30, 30) & "/" & month ([end date]) & "/" & year ([end date])

Day name of the week: E. g Monday, mon

= Text (weekday ([start date]), "dddd ")

= Text (weekday ([start date]), "DDD ")

The name of the month for a given date-numbered for sorting-e.g. 01. January:

= Choose (month ([date created]), "01. january "," 02. february "," 03. march "," 04. else l "," 05. may "," 06. june "," 07. july "," 08. august "," 09. september "," 10. october "," 11. november "," 12. december ")

Get hours difference between two date-time:

= If (not (isblank ([End Time]), ([End Time]-[start time]) * 24, 0)

Date difference in days-hours-min format: E. G 4 days 5 hours 10 min:

= Year (today)-year (created)-If (or (month (today) <month (created), and (month (today) = month (created ),

Day (today) <Day (created), 1, 0) & "years," & month (today)-month (created) + If (and (month (today)

<= Month (created), Day (today) <Day (created), 11, if (and (month (today) <month (created), Day (today)

> = Day (created), 12, if (and (month (today)> month (created), Day (today) <Day (created),-1 ))) & "months,

"& Today-date (year (today), month (today)-If (Day (today) <Day (created), 1, 0), Day (created) &" days"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.