3.5.9.15 TimeTime-func
Description
This function returns the Julian-day value which Origin uses internally to represent time.
See this note.
Syntax
double time(int hh, int mm, int ss)
double time(string str[, string Format])
Parameters
hh
- Hour
mm
- Minute
ss
- Second
str
- Time string which is in the format as argument strFormat
Format
- It is available since 90SR0. Format string of which default value is "HH:mm:ss". When it is specified as a 0-offset number in string, it represents the index of the format listed in Column Properties. For other cases it is custom format strings(e.g., "DDD HH:mm:ss")
Return
returns the Julian-day value.
Example
double aa = time(20:50:25);
aa = ;//Should return the Julian-day value of this time, 0.86834490740741.
double aa = time(20,50,25);
aa = ;//Should return the Julian-day value of this time, 0.86834490740741.
double aa = time(35:400:500);
aa = ;//Should return the Julian-day value of this time, 1.7418981481481.
double aa = time("2 20:50:25", "DDD HH:mm:ss");
aa = ;//Should return the Julian-day value of this time, 2.8683449074074.
double aa = time("002:12", "12");
aa = ;//Should return the Julian-day value of this time(in format of index 12), 2.5.
See Also
Date
|