# SQL Date and Flash Date problem

**URL:** <https://forum.kirupa.com/t/sql-date-and-flash-date-problem/297800>\
**Category:** flash\
**Created:** [October 8, 2009, 3:16pm UTC](https://forum.kirupa.com/t/sql-date-and-flash-date-problem/297800 "2009-10-08T15:16:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![superpeppe](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@superpeppe](https://forum.kirupa.com/u/superpeppe)\
**Post date:** [October 8, 2009, 3:16pm UTC](https://forum.kirupa.com/t/sql-date-and-flash-date-problem/297800/1 "2009-10-08T15:16:13Z")

</div>

I am using the local database feature in AIR 1.5. I have a table which is created by:

```auto
"CREATE TABLE IF NOT EXISTS employees (timeAdded Date, name STRING)"

```

Now lets say that I want every employee added between date1: Date and date2: Date, I would do that by using:

```auto
"SELECT * FROM employees WHERE " + date1 + "<timeAdded AND timeAdded<" + date2

```

This does not work, because the type Date in SQL is a Julian day number (JDN), and date1 and date2 are flash formatted dates. It is not possible to get the JDN of a date through flash. How do I solve the problem?
