Number to Date

From: Miguel Salles (MiguelSalles_at_discussions.microsoft.com)
Date: 09/27/04

  • Next message: Anith Sen: "Re: SUBSTRING question"
    Date: Mon, 27 Sep 2004 10:59:04 -0700
    
    

    Hi,

    I have a legacy system that uses a strange date format, wich I'd like to
    convert for datetime on a new table.
    The date is in this format: 104001(2004-01-01), 104002(2004-01-02),
    104271(2004-09-27)
    I think that I'll have to break the problem in two parts:
    The year - three first digits + 1900
    the day - three last digits (dy) day of the year.
    I can generate the days by using "datepart(dy,date)", but how can i make the
    way back? (to transform 271 in 09-27)

    Thanks for your help.


  • Next message: Anith Sen: "Re: SUBSTRING question"

    Relevant Pages

    • Re: Number to Date
      ... >I have a legacy system that uses a strange date format, wich I'd like to ... >convert for datetime on a new table. ...
      (microsoft.public.sqlserver.mseq)
    • Re: Dates
      ... I have never ever had any problems with a date in ISO 8601 format. ... The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. ... System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +260 ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: How to Validate a Date Filed.
      ... I'm writing, and the fourth test is just getting fancy; ... IsValid As Boolean = True) As DateTime ... > You can validate a date using Regular Expressions. ... > objects and setting culture to a country that uses the date format you ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Boolean field in dataset
      ... Crystal only formats the datetime data in the ... dataset extracted from sql database but not the datetime variable data that I ... it recognized it to be datetime field ... When I format these 2 datetime fields Crystal ...
      (microsoft.public.vb.crystal)
    • Re: Date/Time. Looked Everywhere. Urgent. Thanks.
      ... to parse a date specified in the US English format: ... DateTime dtDate = DateTime.Parse(strDate, ifProvider); ... > Dim news As New XmlDocument ... I would use a DateTime field not only just ...
      (microsoft.public.dotnet.framework.aspnet)