Lead Time Conversion

sbolton1855
Member Posts: 39
I am writing a SSRS report that exports fields from the Item table. One of the fields i need is Safety Lead Time. Is there a way to convert this field in a way SSRS understands? thanks
0
Comments
-
What exactly is it not understanding?
What kind of result would you like to see?0 -
Format o DateFormula datatype on SQL was already discussed few years back.Just search the forum for DateFormula and SQL.0
-
The 'lead time calculation' in the 'Item' table is a varchar(32), this is not a normal date. It is my understanding that he NAV system interprets this string to an output such as 3 day, 1 week etc calculation.
I dont think DateFormula and SQL will get me where i am going, since this field is not a datetime datatype, it is a varchar(32).0 -
ah you were right DateFormula :whistle:
replace(replace([Lead Time Calculation],CHAR(1),'C'),CHAR(2),'D') this seems to get me about half way there, some of the fields are still displaying wrong.....0 -
this seems to be as far as i can go with the data in my system
[Lead Time Calculation], REPLACE(REPLACE(REPLACE(REPLACE([Lead Time Calculation], CHAR(1), '?ContactAdmin'), CHAR(2), 'D'), CHAR(3), '?ContactAdmin'), CHAR(4), 'W')
0 -
C = 0x01 *current
D = 0x03
W = 0x04
M = 0x05
Y = 0x07
quoted from viewtopic.php?f=23&t=20075&p=940850 -
I got the whole thing here:
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE([dbo].[CompanyName$Item].[Lead Time Calculation],
CHAR(1), 'C'), CHAR(2), 'D'), CHAR(3), 'WD'), CHAR(4), 'W'), CHAR(5), 'M'), CHAR(6), 'Q'), CHAR(7), 'Y')
--C=current, D=day, WD=weekday, W=week, M=month, Q=quarter, Y=year)
Hope it helps.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions