473,385 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

make one field in a query with two diffrent formats

i wont to make a field in a select query to put two fields from a
table
into one field or control like " Expr1:[field1]&' '&[field2] "
but the problem is thet "field1" is a Currency format and field2 is a
date\time format so when i run the query its display like this " 20
1/25/04 "
but in the table is displaying field1 like this " $20.00 " and ist
lost the format in the query so what cen i do to make it in one field
and the display shoot come up with the format Currency for field1 and
then the field2 with its
onae format i wont thet the query shold show me in one field like
this:
********** [ $20.00 1/25/04 ] *************

thank for whoo ist can help me i will very Appreciate

thanks in sdvense
zi******@thejnet.com
Nov 12 '05 #1
2 1490
On 27 Feb 2004 09:15:10 -0800, zi******@thejnet.com (zion saal) wrote:
i wont to make a field in a select query to put two fields from a
table
into one field or control like " Expr1:[field1]&' '&[field2] "
but the problem is thet "field1" is a Currency format and field2 is a
date\time format so when i run the query its display like this " 20
1/25/04 "
but in the table is displaying field1 like this " $20.00 " and ist
lost the format in the query so what cen i do to make it in one field
and the display shoot come up with the format Currency for field1 and
then the field2 with its
onae format i wont thet the query shold show me in one field like
this:
********** [ $20.00 1/25/04 ] *************

thank for whoo ist can help me i will very Appreciate

thanks in sdvense
zi******@thejnet.com


When you concatenate currentcy into strings, you get the plain numeric format.
Use the Format function to convert data from any built-in, scalar data type
into a desired format. In this case, use " Format([field1],'$0.00') & ' ' &
Format([field2],'m/d/yy') ".
Nov 12 '05 #2
Within the expression for the field, use Format() on each of the fields
separately, and convert this result into a string.

Expr1: CStr(Format([field1], "Currency") & " " & Format([field2], "Short
Date"))
Mike Storr
www.veraccess.com
"zion saal" <zi******@thejnet.com> wrote in message
news:c9**************************@posting.google.c om...
onae format i wont thet the query shold show me in one field like
this:
********** [ $20.00 1/25/04 ] *************


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: wimmie | last post by:
Hello to all, I have a 'small' problem. I have made a application in php that connect trough ODBC to a Oracle RDB (VMS) or Basis+ database (VMS) and present the data to a user. There are 2...
13
by: | last post by:
I have an Access database used to track donor pledges. In it, there is a table that contains three fields for each donor: Gift_Amount, Gift_Per_Year, and Matching_Gift_Ratio. The following...
7
by: Consuelo Guenther | last post by:
Hello, I have an asp page that has a function that connects to an Access database. I am using Javascript. Is there any way to reference the field name in the database through a variable in a sql...
1
by: compusup3000 | last post by:
Hi, I have an orders database and I need to be able to write a query that groups sales by: 1. Date 2. Time of day (both am and pm) I currently have a date/time field named "Submitted" that...
2
by: mtech1 | last post by:
Access 2000 I have a text field that data was imported into. Now I have a field that has SSN's in different formats. (123-45-6789 and 123456789) What I would like to do is to update the field...
11
by: Dixie | last post by:
How can I programatically, take some Date/Time fields present in a table in the current database and change their type to text? dixie
2
Pittaman
by: Pittaman | last post by:
Hello, Sorry about the title, I had a hard time explaining this. I've done a little trick to solve a problem I was having with this third party control, and was wondering if anyone here could...
1
by: lawardy | last post by:
Hi, I'm quite new with Reporting server 2005. I'm wondering if there is a way to write a select query that will get the data from 2 diffrent tables located in 2 diffrent database box. for...
1
by: LFM | last post by:
I have a database setup that uses ODBC connections into SQL for read only views to compare information from multiple sql databases in our company. Most of the tables use the Employee ID as the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.