MS Project中的内部日期存储格式 [英] Internal date storage formats in MS Project

查看:279
本文介绍了MS Project中的内部日期存储格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用自定义字段来创建红色 - 琥珀色 - 绿色标记,这取决于某些内容的延迟,例如:将截止日期与项目的当前状态日期进行比较。


我似乎无法以我期望的方式工作,甚至一个测试公式只是减去我手工输入的两个日期列返回奇数小数日期,例如2.43而不是2,表示12/3/2012和12/5/2012之间的差异。


有人可以解释Project如何存储日期或指向我的文档,类似于什么在相同topi的Excel帮助中?。


当我在它时,下一个问题是如何处理  " " NA" Project自动放入未填充的日期字段的值。


IIF([field] =" NA"," true"" false")似乎返回错误。

解决方案

Ray,


我无法确切地告诉你为什么会得到2.43 2没有附加信息。可能是您已将文件/选项/计划组下的日期重新定义为默认的8小时(例如6.5小时)。如果您使用默认的
设置并在自定义文本字段中放置一个简单的日期减法公式(即[Date2] - [Date1]),公式确实会产生天数差异。如果您为公式使用额外的持续时间字段(例如,持续时间1),获得日期差异
的最佳方法是使用:


ProjDateDiff(date1,date2,日历)为工作日的差异



DateDiff(interval,date1,date2,firstdayofweek,firstweekofyear)日历天差异


快速"解释"如何处理"NA"在日期字段中,请参阅Jack Dahlgren的文章,http://masamiki.com/project/customfieldFAQ.htm


更多信息。项目以分钟为单位存储所有时间相关的数据,实际上是最接近的1/10分钟,如果我没记错的话,所以只是让日期不够,时间也很重要。


<希望这会有所帮助。


John


I'm trying to use custom fields to create red-amber-green flags based on how late something is, e.g. compare a deadline to the project's current status date.

I cannot seem to get things to work the way I expect and even a test formula that just subtracts two dates that I have hand entered in different columns is returning odd fractional dates, e.g. 2.43 instead of 2 for the difference between 12/3/2012 and 12/5/2012.

Can someone eitehr explain how Project stores dates or point me to documentation on this similar to what is in the help for Excel on the same topi?.

While I am at it, the next question is how to handle test for the "NA" value that Project automatically puts in a date field that is not filled.

IIF([field]="NA","true","false") seems to return errors.

解决方案

Ray,

I can't tell you exactly why you get 2.43 instead of 2 without additional information. It could be that you have re-defined your day to be something other than the default 8 hours (e.g. 6.5 hours) under File/Options/Schedule group. If you use the default settings and put a simple date subtraction formula (i.e. [Date2]-[Date1]) in a custom text field, the formula will indeed yield the difference in days. If you are using an extra duration field (e.g. Duration1) for your formula, the best way to get a date difference is to use either:

ProjDateDiff( date1, date2, calendar ) for the difference in working days

or

DateDiff( interval, date1, date2, firstdayofweek, firstweekofyear ) for the difference in calendar days

For a quick "explanation" of how to deal with "NA" in date fields, see Jack Dahlgren's article at, http://masamiki.com/project/customfieldFAQ.htm

A further bit of information. Project stores all time related data in minutes, actually to the nearest 1/10 of minute, if I recall correctly, so just having the date isn't always enough, the time is also important.

Hope this helps.

John


这篇关于MS Project中的内部日期存储格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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