Re: can anyone tell me how to use DTS to convert a ISO date time to JAVA long type?

From: Darren Green (darren.green_at_reply-to-newsgroup-sqldts.com)
Date: 03/09/04


Date: Tue, 9 Mar 2004 18:03:25 +0000

In message <upO0tKaBEHA.2404@TK2MSFTNGP11.phx.gbl>, Victor.Liang
<victor.liang@timogen.com> writes
>Hi, guy
> There is a column which type is ISO DATE type in my source DB,
>And I want to convert this ISO date time to JAVA long time in my
>destination DB.
>
>can anyone tell me how to do this?
>
>
I thought most DBs, SQL Server included never stored a date in a
"format", but take the input and store it in an internal format, such as
number of time periods offset from a known date. This way the format is
not a DB issue at all, but a presentation issue.

If you are working with dates as strings, or date to string then you can
do this inside an ActiveX Script Transform. You can use date functions
such as Year, Month, DatePart and the Mid, Left string functions to
build a formatted date string.

If none of the above helps can you clarify the DB types involved, and
also gives an example of the formats you want.

-- 
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com
PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org


Relevant Pages

  • Re: mm/dd/yyyy format question
    ... I was not talking about how .Net or SQL Server stores date/time values ... I get the impression that you are talking about ISO 8601 in terms ... applications use the format for unambiguously representing date/time ...
    (microsoft.public.dotnet.languages.vb)
  • Re: FAQ Topic - How do I format a date with javascript? (2009-06-01)
    ... An invalid date keeps the code a tiny bit smaller. ... The ISO 8601 Extended format can be understood internationally, ... @param {string} input: ...
    (comp.lang.javascript)
  • Re: Moving a VBA function to SQL server
    ... "String Functions " in Books Online. ... The SQL server database contains a table named 'WorkOrders'. ... This will produce a job header formatted like this: ... The format he specifies is stored in table 'Settings' - field 'JobHdrMask' ...
    (comp.databases.ms-access)
  • Re: FAQ Topic - How do I format a date with javascript? (2009-06-01)
    ... instead of a YYYY-MM-DD string also works; ... The ISO 8601 Extended format can be understood internationally, ... ISO 8601 Extended formats can be... ... Most inputs will pass validation, so the need is to reach success ...
    (comp.lang.javascript)
  • Re: mm/dd/yyyy format question
    ... "what is the logical way to configure server, sql server or program so ... it always deals with date as mm/dd/yyyy format". ... ISO 8601 specific to Asian countries? ... If the original question had been about what .Net classes/objects to ...
    (microsoft.public.dotnet.languages.vb)