Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)

  • RE: Log file bigger than data file

    Hi,

    As noted before, if you always do full backups you can change the recovery model to SIMPLE in database options and the log will shrink after each backup.

    Best,

    lx

  • RE: Convert VARCHAR into DATETIME

    If you use the udf you can change it to something like this:

    CREATE FUNCTION [dbo].[DateSerial]

    (

    @year int,

    @month int,

    @day int

    )

    RETURNS Datetime

    BEGIN

    if @year < 30 --dates...

  • RE: Convert VARCHAR into DATETIME

    If your dates have different lengths I guess you'll have to split them and check if the year is 2 or 4 digits. I use this function to convert separate...

  • RE: Convert VARCHAR into DATETIME

    Hi,

    In your particular case I would just use this:

    substring( field, 7, 4) + substring( field, 4, 2) + substring( field, 1, 2)

    That's because a string in the format YYYYMMDD is...

  • RE: extract days,hour,min,sec

    Even simpler:

    cast(datediff(dd,0,getdate()) as datetime)

    lx

Viewing 5 posts - 1 through 5 (of 5 total)