HomeForum
Welcome, Guest

Datetime
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Datetime

Datetime 5 years, 8 months ago #196

  • kriviere
  • OFFLINE
  • Junior Boarder
  • Posts: 31
  • Karma: 0
I have data with just a date (MM/DD/YYYY) in one field which I want to load into a SQL Server datetime field. Everything which I have tried for directly loading the data has left me with just a time of midnight with no date specified, in other words with an apparent value of 0. I've tried calculating the field and mapping the field. I've used the format field below the formula to specify the layout of the date.

The one time I had success was when I declared the target field as a char field, then altered the table to change the char field to a datetime field. That seemed to give me dates, in my results, but I'm not sure what it was doing because I was not able to accurately select date ranges. It appeared to still be treating the data as char fields.

I'm using ver. 7.3.1 of VImp Pro. What am I missing here?

RE: Datetime 5 years, 8 months ago #197

  • mike8888
  • OFFLINE
  • Expert Boarder
  • Posts: 131
  • Karma: 0
Can you email us scresshot of your mapping taht we can see source field data and target filed mapping please

RE: Datetime 5 years, 8 months ago #199

  • kriviere
  • OFFLINE
  • Junior Boarder
  • Posts: 31
  • Karma: 0
I have just emailed the screen shot to info your company (the email listed for the admin user). Thanks for your help.

RE: Datetime 5 years, 8 months ago #200

  • mike8888
  • OFFLINE
  • Expert Boarder
  • Posts: 131
  • Karma: 0
Hi

The problem with your file that you got data and time in two separate fileds.
What you meed to do is to concatenate them together and apply date format

1. set mapping type for CALL_DATE field to calcualted
2. type "[F3]"+" "+"[F4]" in calculation box
3 select date format DD/MM/YYYY HH:NN:SS

Mike

RE: Datetime 5 years, 8 months ago #208

  • kriviere
  • OFFLINE
  • Junior Boarder
  • Posts: 31
  • Karma: 0
OK, I've tried your suggestion. I've set it to calculated using the format you suggested. I've tried all of the following as formulae:

"[F3]"+" "+"[F4]"
[F3]+ +[F4]
[F3]+" "+[F4]
[F3] [F4]
[F3][F4]
[F3]+[F4]

I keep getting nothing but nulls loaded into the datetime field. This is getting somewhat frustrating. Did you actually try the formula you specified with some data and a datetime field in an SQL Server database? How about sending me a screen shot of such a successful load? I don't know what else to try.

RE: Datetime 5 years, 8 months ago #210

  • mike8888
  • OFFLINE
  • Expert Boarder
  • Posts: 131
  • Karma: 0
I did and it did work
Screeshot is on it's way
Mike
  • Page:
  • 1
  • 2
Time to create page: 0.20 seconds

Testimonials

"I needed to integrate and automate disparate systems running different database platforms that speak different languages, even different flavors of SQL. Visual Importer products have become that common link for me."

Gene Kovacs,
Director of Technical Business Operations,
A2B

User Login

You only need to log in or register to use our support forum



Our customers

BP

BBC

HSBC


Databases we work with

Go to top