These functions take text as their input, but they output data of the appropriate type. So if you want to store a time as the result, then use a time field. If you want to store a date, use a date field.
the "text" means that you have a 'date' that is quoted text:
GetAsDate("1/1/2016") and gives you a DATE type value. While the quoted date looks like a date to you and I, it doesn't to FM.
Date (monthNumber ; dayNumber ; YearNumber ) is the way you may be able to also push the 'text' values into a date.
Date ( Left("1/1/2016";1) ; Middle("1/1/2016";3;1) ; Right("1/1/2016";4) )
If the Date "numbers" in the .csv file are in Excel format (number of days since 1/1/1900), then they will not match FileMakers number of days since 1/1/0001.
The "number" in this FM function's value (not text) will use the FileMaker #of days (not Excel's):
GetAsDate(735516) returns 10/10/2014. The number 735516 specifies the number of days since 1/1/0001.
Does that help?
I have been told by another poster that GetAsDate ( (episodedt + 715510)) will work and it has.
I think I have the GetAsDate problem solved.
Ok let me see If I understand.
I need to create a variable as type time and then do the GetAsTime( txt) calculation.
I was trying to do it on import.
I would create a calculation variable and then do GetAsTime( imported txt serial number) calculation with a time value returned.
When I set the imported variable to text It did not work returned serial number
When I set the imported variable to number. It did work returned the right time.
Arrival time - type text - value 17595 -on import GetAsTime(Arrival time) outputs 17595.00 calculation set to time
Arrival time - type number - value 17595 -on import GetAsTime(Arrival time) outputs 04:53:15 calculation set to time
I don't know what this "episodedt" is. Is it a variable somewhere? a custom function?
I am sorry episodedt is the episode date serial number calc from 1/1/1960. Base on another poster from this site the episode date plus 715510 will get me the real date with GetAsDate. I have used it and works beautifully.
ah! then the excel date-as-number + this magical number = fmp date-as number. I didn't see that "poster" on this thread.
Hopefully others will see that the imported number from excel doesn't directly relate!