Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
i am a beginner, doing projects, i have a doubt, how can we extract date from year/month field in script. Please explain it in briefed script
Hi
try this
MakeDate(year(Expected_Decision_Date),month(Expected_Decision_Date)) as monthyear
Hi,
Use makedate( ) function
Regards,
Anand
hi anand,
Thanks for ur reply, please explain how can i use makedate(), as script
Hi Kalyan,
You can use functions like Month, Year.
Suppose your InvDate = 11/15/2012
for Month=======Month(InvDate) as InMon
for Year========Year(InvYear) as InvYear
Incase you dates are Strings in your QVD, you would have to do an Substring to extract the year and months.
Kidnly post an sample data file, will be able to help better.,
You can refer to the QVW file I attached in the previous post for your query for Average sales. It has the functions.
Regards
Fahad
hi fahad,
Thanks for ur reply, i know that we can make year and month from date field given in the table, but i have a data only for year and month, i have to extract date from those fields
Hi
try this
MakeDate(year(Expected_Decision_Date),month(Expected_Decision_Date)) as monthyear
as what anand mention, use makedate()
when loading your data.. let us say:
LOAD Year,
Month,
makedate(Year) as Date1
FROM
...
this will create a date for Date1. e.g: let us say your year is 2012, output is 1/1/2012
Hi,
Write in script like
With year your field
Makedate(Year) as Date
HTH
Regards,
Anand
hi,
Thanks for your reply, i get the date as 1/1/2012, but i have year field for two years(2011, 2012) i should get 1/1/2011 to 1/12/2012. please help me to solve this prob