jkluchnik Posted July 29, 2023 Posted July 29, 2023 I have an excel sheet with a date 7/29/2023. When I read that cell with Scribe, and create a variable $date, it returns the number 45136. If I then say GetAsDate ($date), I get "?". If I further wrap it as GetAsDate ( GetAsNumber ($date ) ), I get 7/30/0124, which is obviously wrong.
comment Posted July 29, 2023 Posted July 29, 2023 I am not a Scribe user, but perhaps this can help: https://fmforums.com/topic/106140-excel-date-field-a-number/?do=findComment&comment=479670
jkluchnik Posted July 29, 2023 Author Posted July 29, 2023 Thanks very much. That did the trick. Strange part is that the sheet was created on a Mac so the dates should have been 1904. I looked at my settings and sure enough Use 1904 had been switched off. So I turned it back on, made a new sheet, and then tried it without your formula. The results were wrong again and off by 4 years. The only way I can get it working right is to use the 1900 dates plus your formula.
comment Posted July 29, 2023 Posted July 29, 2023 (edited) 59 minutes ago, jkluchnik said: So I turned it back on, made a new sheet, and then tried it without your formula. The results were wrong again and off by 4 years. I am afraid I don't follow. What is the raw result you get from reading a cell with a date of 7/29/2023? It should be either the date 7/29/2023 (in your FMP file's date format) or the number 43674. Edited July 29, 2023 by comment
Recommended Posts
This topic is 481 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now