How To Get YYYYMMDD Formate

Jul 3, 2007

Hello,



I use

CAST( PYBTHC as varchar(2))+CAST( PYBTHY as varchar(2))+CAST( PYBTHM as varchar(2))+CAST( PYBTHD as varchar(2)) to get a string like 199232. How to get 19920302? What function I can use to pad '0' left when it less than 10>



Thanks

View 7 Replies


ADVERTISEMENT

Need A Report Formate Like This

Dec 4, 2007

hi,

i need a report formate mention below
the formate should reach 100% as given below
can anybody help me out
i using SQL Reporting Service 2000















Profit and Loss Satement for "California" region



















For the fiscal year 2007


















Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Total

Revenue














Gross Sales
$11,737
$12,655
$11,783
$13,606
$11,787
$13,003
$11,599
$14,932
$12,862
$13,078
$15,285
$16,839
$159,168

Cost of Goods Sold
$0
$0
$0
$0
$0
$0
$0
$0
$0
$0
$0
$0
$0
















Total Revenue
$11,737
$12,655
$11,783
$13,606
$11,787
$13,003
$11,599
$14,932
$12,862
$13,078
$15,285
$16,839
$159,168
















Net Sales
$11,737
$12,655
$11,783
$13,606
$11,787
$13,003
$11,599
$14,932
$12,862
$13,078
$15,285
$16,839
$159,168
















Total Net Sales
$11,737
$12,655
$11,783
$13,606
$11,787
$13,003
$11,599
$14,932
$12,862
$13,078
$15,285
$16,839
$159,168
















Expenses














General & Administration
$1,198
$1,198
$1,198
$1,198
$1,198
$1,198
$1,198
$1,198
$1,198
$1,198
$1,198
$1,198
$14,381

Information System
$2,059
$2,059
$2,059
$2,059
$2,059
$2,059
$2,059
$2,059
$2,059
$2,059
$2,059
$2,059
$24,709

Marketing
$2,891
$2,891
$2,891
$2,891
$2,891
$2,891
$2,911
$2,911
$2,911
$2,911
$2,911
$2,911
$34,813

Lease
$1,107
$1,107
$1,107
$1,107
$1,107
$1,107
$1,107
$1,107
$1,107
$1,107
$1,107
$1,107
$13,285
















Total Expenses
$7,256
$7,256
$7,256
$7,256
$7,256
$7,256
$7,276
$7,276
$7,276
$7,276
$7,276
$7,276
$87,188
















Gross Profit
$4,482
$5,399
$4,528
$6,350
$4,532
$5,748
$4,324
$7,657
$5,587
$5,802
$8,009
$9,563
$71,980
















Gross Profit Margin
38.18%
42.66%
38.42%
46.67%
38.45%
44.20%
37.28%
51.28%
43.44%
44.37%
52.40%
56.79%
$5

Expenses / Sales
61.82%
57.34%
61.58%
53.33%
61.55%
55.80%
62.72%
48.72%
56.56%
55.63%
47.60%
43.21%
$7

View 3 Replies View Related

How To Have DATE Formate YYYY-MM-DD ?

Aug 24, 2007

Hi

I am having a procedure and try to get the date (current date)as 'launchdate' in the output. So how do I get the right date format as below?

YYYY-MM-DD - if this is difficult then how do I get the below format

2007-08-23T14:26:53-07:00

Advance thanks

View 19 Replies View Related

Formate Phone Number Field

Jan 17, 2005

Hi,

I need to formate one of my phone number field in SQL. now the data in the field is: 1234567890. I would like to formate the number to 123-456-7890. Does anyone know how to do this? Thanks.

Nicole

View 5 Replies View Related

Want To Get The Date Format 'yyyymmdd Hh24miss'

Apr 15, 2002

Hi folks,

Want to Have following date format yyyymmdd hh24miss in an insert statement please do suggest me the easiest way of inserting using a convert(char, GETDATE(), ????). Can some body fill the question mark if not does any body know how this can be solved.,

Thanks in Advance
Regards
Tappu

View 2 Replies View Related

Need Date As Yyyymmdd Format And Time

Oct 30, 2014

I am using below query to get the data and time+2 hrs

selectdateadd(hour, datediff(hour, 0, getdate()) + 2, 0)

getting results as like this

2014-10-30 13:00:00.000

but i don't need any dashes between dates i mean i am expecting results as shown below

20141030 13:00:00.000

View 1 Replies View Related

Convert CHAR YYYYMMDD To Mm/dd/yyyy

Aug 23, 2007

I can't seem to find a method of converting a CHAR(8) column in the form ofYYYYMMDD to an actual date such as mm/dd/yyyyCan anyone point me in the right direction?Thanks

View 17 Replies View Related

Convert INT YYYYMMDD To Date Mm/dd/yyyy

Aug 24, 2007

I can't seem to find a way to convert an INT type in the form of YYYYMMDD toan actual date form of mm/dd/yyyyCan anyone pointt me in the right direction?Thanks

View 1 Replies View Related

How To Find 'x' Number Of Days From 'yyyymmdd' Format?

Nov 15, 2004

I need to find out the count of number of records older than 100 days from a table having 'order_date' as yyyymmdd format eg. 20041115. Thanks in advance.

View 9 Replies View Related

RFE: SSIS Should Recognise YYYYMMDD HH:MI:SS && YYYY-MM-DDTHH:MI:SS

Jun 27, 2006

Hi,

I've found a bit of an inconsistency between the way SQL Server treats dates and the way that SSIS treats them.

As stated here: http://blogs.conchango.com/jamiethomson/archive/2005/04/26/1337.aspx the only totally unambiguous datettime string formats that SQL Server accepts are:
yyyymmdd hh:mi:ss
yyyy-mm-ddThh:mi:ss



Given that then, its a bit annoying that, as stated here: http://blogs.conchango.com/jamiethomson/archive/2006/06/26/4141.aspx those two formats are not accepted as valid datetime string formats in the SSIS pipeline (check the bottom data viewer in the screenshot at the above link).



I know that there is no strict requirement for SQL Server and SSIS to do the same thing as each other in situations like these but let's be honest - we all expect it to.



Any comments from MSFT?
Is it worth me raising this at Microsoft Connect?

-Jamie

View 6 Replies View Related

Date Conversion - Flat File - YYYYMMDD

Jul 19, 2007

Hi,

What is the new way to transform flat file dates into SQL datetime datatype. Being average user in SQL 2000 DTS I would simply use "Date Time String Transformation Properties" and transform the date into the format I need, in SSIS I haven't found an elegant way of doing this.

My thoughts are to use €œdata conversion€? utilizing substring expressions€¦

Thanks the help
Bill

View 6 Replies View Related

Create Dts Variable For Date In Character Format Yyyymmdd

Nov 23, 1999

I'm trying to create a variable for use in a DTS job for yesterday's date in the string format YYYYMMDD for use in pulling yesterday's material transactions from my ERP system. I've got the Query statement created and working fine, but I have to manually go into the DTS job and insert the proper date manually. I'm looking into an Active-X script inserted into the workflow for the job to create a global variable, but I can't seem to come up with anything that works.
Any help or direction would be appreciated.
Thanx in advance!!
Glenn

View 1 Replies View Related

Yyyymmdd Text Data Into A Datetime Field In SQL Server?

Apr 19, 2006

Hello,

I have an Excel spreadsheet that contains 100,000 + rows of data. Two of the columns in the spreadsheet are date fields that are sent over in the yyyymmdd format (no separators such as "-" or "/"). I tried converting these fields into dates using the Data Conversion task in SSIS. This doesn't work as it appears that SSIS cannot map a string in the format of yyyymmdd to a valid date. In lieu of this, I have added a Script Component to my transformation which can take the string and convert it to a date value using some Substring() calls on the source yyyymmdd string.

A few questions for the group ...

1. Is this there a more efficient or "better" way of performing this transformation?

2. I can also use OLE DB Command task in my transformation and make a call that might do something like this: select convert(datetime, convert(varchar(10), [@yyyymmddValue])) but how would this perform related to the Script Component task? My guess is that this would be slower since the transformation would make a database call for every record.

3. Are there any plans for the SQL team to make these types of conversions easier to implement in the future? It seems to me that this is a pretty common scenario for integrating date data.

Thanks!

Brian

View 19 Replies View Related

SSIS Data Conversion: Convert A String (like Yyyymmdd) Into Datatype Dt_DBDATE Or Dt_DBDATE

Jun 6, 2007

Hi All,



I need a solution for the following:



I have a field with datatype string, length 8, in the form yyyymmdd (f.e. 20070604).



Now I need to transfer this field into a field with datatype dt_DBDATE or DT_DBDATE.



I tried to perform this with a derrived column and type cast (DT_DATE) or (DT_DBDATE), but this does not work.



Any hint for me!!!



Thanks in Advance



ulrike

View 5 Replies View Related

Analysis :: Calculated Column That Makes Integer In YYYYMMDD Format Form Date Column

Oct 12, 2015

I am trying to create a whole number DAX calculated column that is derived from a date column. Basically it gets the date from the source data column and outputs it as an integer in the YYYYMMDD format.So 01/OCT/2015 would become --> 20151001...I've been fidgeting with DAX but my problem is that I keep missing the leading zeroes for months and days. So 01/March/2015 becomes 201531 which is not what I want (I need 20150301 in this case).

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved