I have a formula that returns a number in the format 12/12/2008,it still is not a date formula,its a number,i would like to convert that value into date,i tried using the datevalue function but it says BadDateFormat string,how to use this function...
I have trouble believing that 12/12/2008 is really a number datatype, since I think it would calculate, instead of maintaining this display, i.e., 12 divided by 12 divided by 2008. Can you verify the datatype by observing the tooltext when you run your mouse over the field?
Madawc -- I tested that and it worked for me. Good, catch. I assumed/thought that CDate expected the string in a specific format (other than mm/dd/yyyy).
Like I said....many ways to skin a cat. Yours, however, is much cleaner.
12/12/2008 is not a number,its a value returned from a function in which i concatanate a string from extracting 2 characters,4 characters from another string to form a date like value.
Also is there a function to calculate the datedifference from todays date minus a specific date,i think i tried date-whatever date that is and get a numeric value,is this correct?
intervalType is a String expression that is the interval of time you use to calculate the difference between startDateTime and endDateTime. Possible values can be:
yyyy Year
q Quarter
m Month
y Day of year
d Day (both "y" and "d" find the difference in days)
w Number of weeks between startDateTime and endDateTime
ww Number of firstDayOfWeek's between startDateTime and endDateTime
h Hour
n Minute
s Second
startDateTime is the first DateTime value used in calculating the difference.
endDateTime is the second DateTime value used in calculating the difference.
firstDayOfWeek is an optional constant specifying the first day of the week. If not specified, crSunday is assumed. See Day of Week constants.
Returns -- A Number value.
Action -- DateDiff returns a number of time intervals between two specified dates.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.