Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Converting text to date format while importing from web

Hello,

I was able to connect to Alerts and Warnings and pull in the table containing Date, Type, and Location. My issue is that the Date is not returning as a date field in Qlikview. I have tried using Data(Date# and other methods but none have completed the task. I am able to connect to it via Excel and it easily recolonizes the date as a date field, not sure how to correct this. Any help would be great! Thank you

Tags (4)
1 Solution

Accepted Solutions
Employee
Employee

Re: Converting text to date format while importing from web

You need to tell QlikView what the long Month names are... Do the following

Set LongMonthNames =

          'January;February;March;April;May;June;July;August;September;October;November;December';

LOAD Type,

     Date#(Date,'MMMM DD, YYYY') as Date,

     Location

FROM [http://travel.state.gov/content/passports/english/alertswarnings.html]

(html, codepage is 1252, embedded labels, table is @1);

The MMMM maps against the LongMonthNames.

HIC

2 Replies
Employee
Employee

Re: Converting text to date format while importing from web

You need to tell QlikView what the long Month names are... Do the following

Set LongMonthNames =

          'January;February;March;April;May;June;July;August;September;October;November;December';

LOAD Type,

     Date#(Date,'MMMM DD, YYYY') as Date,

     Location

FROM [http://travel.state.gov/content/passports/english/alertswarnings.html]

(html, codepage is 1252, embedded labels, table is @1);

The MMMM maps against the LongMonthNames.

HIC

Not applicable

Re: Converting text to date format while importing from web

Thank you!

Community Browser