[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

concatenate a date field

Posted on 2012-03-28
2
Medium Priority
?
562 Views
Last Modified: 2012-06-27
Hi, I'm making a crystal report and used a parameter:  date,  "10/23/2010".  I'd like to create a single numeric field from a formula like "201010".  When I create the date "10/23/2010" as Year 2010 (number) then Month 10 (number) then try to concatenate the two I get a string value with comma and decimal like 2,010.00 then I can not format the field, same for the month 10.00 they both show up as string values.

Is there a way to do this as 201010?  I need to do some calculation and compare on these fields once created as formulat.  What  do I need to  use?   I tried Concatenate (&, +""+,Var,Cstr,etc.)  Is there anyway to do this?  Thanks in advance.
0
Comment
Question by:Renshi04
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 2000 total points
ID: 37777502
Create a formula field...

totext({table.datefieldname}, "yyyyMM")
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 37777593
That should work.

Using your method you would want to use

CStr(Year({Datefield},0,'') & CStr(Month({DateField},0)

The 0 means 0 - decimal places and the '' is the thousands separator - in this case none

mlmcc
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

650 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