Using Cast in Access 2007

Posted on 2012-09-02
Last Modified: 2012-09-03
I want to cast some datatypes in Access 2007. I am used to writing SQL in SQL Server Management Studio. I am having trouble changing datatypes that seems pretty simple.

Cast( 3456 as nvarchar(20))
Cast as a decimal  Cast(3.5555 as Decimal(10,2))
Cast as a Date or   Cast('12/25/2012 00:00:00' as Date)
Cast as money or  Cast (45.678 as Money)
Cast as DateTime Cast('12/25/2012' as DateTime)
Question by:chaverly
    LVL 48

    Accepted Solution

    You can use:

    Val(Format(3.5555, "0.00"))
    CDate('12/25/2012 00:00:00')

    LVL 29

    Assisted Solution

    Here's the full list of conversion functions from Access Help file in case you were interested in some others.  
    Conversion Functions

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    In the article entitled Working with Objects – Part 1 (, you learned the basics of working with objects, properties, methods, and events. In Work…
    Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
    In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now