# GetAsText ( “” )

**URL:** <https://the.fmsoup.org/t/getastext/2473>\
**Category:** Lounge (Discussions)\
**Tags:** scripting, calculations\
**Created:** [September 10, 2021, 7:06pm UTC](https://the.fmsoup.org/t/getastext/2473 "2021-09-10T19:06:13Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![xochi](https://avatars.discourse-cdn.com/v4/letter/x/0ea827/32.png) [@xochi](https://the.fmsoup.org/u/xochi)\
**Post date:** [September 11, 2021, 10:31pm UTC](https://the.fmsoup.org/t/getastext/2473/11 "2021-09-11T22:31:11Z")

</div>

It would be nice for some clarity here. My mental model is that FileMaker will store anything in any field (which is both handy, and kind of terrifying from a computer science perspective) but that if you want a "clean" version of the data, you can use the "GetAsX()" functions,

However, that appears to be wrong: this assumes "GetAsDate()" would return you a valid date object, in the "proper" format, but as experienced here: [Partially Valid Dates](https://the.fmsoup.org/t/partially-valid-dates/2461) that's clearly not how it works.

As an example, here's a quiz.  
Run this in the Data Viewer/Watch panel. Before you do, predict what each line will give you.

```auto
GetAsNumber("1 - 7") & "¶" &
GetAsNumber("x df 0. ___ & * 0. 0. 0 7") & "¶" &
GetAsNumber("serial000001") & "¶" &
GetAsText("serial000001") & "¶" &
GetAsDate("09/11/2001") & "¶" &
GetAsDate("09.11.2001") & "¶" &
GetAsDate("09;11;2001") & "¶" &
GetAsDate("09_11_2001") & "¶" &
GetAsDate("09 11 2001") & "¶" &
GetAsDate("2001 09 11") & "¶" &
GetAsBoolean ( "" ) & "¶" &
GetAsboolean ( "foobar") & "¶" &
GetAsboolean ( "1foobar") & "¶" &
GetAsboolean ( "foobar1") 

```

Some of the results are rather surprising.

---

_[View the full topic](https://the.fmsoup.org/t/getastext/2473)._
