• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 520
  • Last Modified:

Using Cast in Access 2007

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)
0
chaverly
Asked:
chaverly
2 Solutions
 
Gustav BrockCIOCommented:
You can use:

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

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

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now